api e token con ck in db
This commit is contained in:
1 parent
a172f05269
commit
2db9525570
18 files changed
+570
-161
No files matched your search
@@ -21,5 +21,10 @@ namespace uWine.Core.Infrastructure.Services
|
||||
{
|
||||
return _authenticationRepository.Valid(user);
|
||||
}
|
||||
|
||||
public User User(User user)
|
||||
{
|
||||
return _authenticationRepository.LoggedUser(user);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,9 +16,9 @@ namespace uWine.Core.Infrastructure.Services
|
||||
IVineyardRepository _vineyardRepository;
|
||||
|
||||
public OwnerService(
|
||||
IOwnerRepository ownerRepository,
|
||||
IAddressRepository addressRepository,
|
||||
IContactRepository contactRepository,
|
||||
IOwnerRepository ownerRepository,
|
||||
IAddressRepository addressRepository,
|
||||
IContactRepository contactRepository,
|
||||
IVineyardRepository vineyardRepository
|
||||
)
|
||||
{
|
||||
@@ -28,9 +28,16 @@ namespace uWine.Core.Infrastructure.Services
|
||||
_vineyardRepository = vineyardRepository;
|
||||
}
|
||||
|
||||
public Owner Owner(int ownerId)
|
||||
{
|
||||
var owner = _ownerRepository.Simple(ownerId);
|
||||
owner = FillData(owner);
|
||||
return owner;
|
||||
}
|
||||
|
||||
public Owner FillData(Owner owner)
|
||||
{
|
||||
owner.Addresses =_addressRepository.OwnerAddresses(owner.Id);
|
||||
owner.Addresses = _addressRepository.OwnerAddresses(owner.Id);
|
||||
owner.Contacts = _contactRepository.OwnerContacts(owner.Id);
|
||||
owner.Vineyards = _vineyardRepository.GetOwnerVineyards(owner.Id);
|
||||
|
||||
|
||||
Reference in new issue
Block a user