Exemple #1
0
        //
        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);
        }
Exemple #2
0
        //
        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);
        }
Exemple #3
0
 //
 public void Create_Buyer(DomainBuyer item)
 {
     _Repositories.Buyers.Create(item.FromDomainBuyerToRepoBuyer());
     Buyers.Clear();
     Buyers = _Repositories.Buyers.GetAll().Select(x => x.FromRepoBuyerToDomainBuyer()).ToList();
 }
Exemple #4
0
 public void Create_Buyer(DomainBuyer item)
 {
     _Repositories.Buyers.Create(item.FromDomainBuyerToRepoBuyer());
 }