// public DomainBuyer GetBuyer(string email) { DomainBuyer model = Buyers.FirstOrDefault(x => x.Email == email); if (model == null) { model = new DomainBuyer { Email = email }; Buyers.Add(model); _Repositories.Buyers.Create(model.FromDomainBuyerToRepoBuyer()); } return(model); }
// public DomainBuyer GetBuyer(string email) { DomainBuyer model = Buyers.FirstOrDefault(x => x.Email == email); if (model == null) { model = new DomainBuyer { Email = email }; Buyers.Add(model); _Repositories.Buyers.Create(model.FromDomainBuyerToRepoBuyer()); Buyers.Clear(); Buyers = _Repositories.Buyers.GetAll().Select(x => x.FromRepoBuyerToDomainBuyer()).ToList(); model = Buyers.FirstOrDefault(x => x.Email == email); } return(model); }
// public void Create_Buyer(DomainBuyer item) { _Repositories.Buyers.Create(item.FromDomainBuyerToRepoBuyer()); Buyers.Clear(); Buyers = _Repositories.Buyers.GetAll().Select(x => x.FromRepoBuyerToDomainBuyer()).ToList(); }
public void Create_Buyer(DomainBuyer item) { _Repositories.Buyers.Create(item.FromDomainBuyerToRepoBuyer()); }