Пример #1
0
 public IEnumerable <PizzaStore.Library.User> GetUserLastName(string search = null)
 {
     if (search == null)
     {
         return(PizzaStoreMapper.Map(_db.Users.Include(o => o.Orders).AsNoTracking()));
     }
     else
     {
         return(PizzaStoreMapper.Map(_db.Users.Include(o => o.Orders)
                                     .AsNoTracking().Where(z => z.LastName.Contains(search))));
     }
 }
Пример #2
0
 public IEnumerable <PizzaStore.Library.User> GetUserPhoneNumber(string search = null)
 {
     if (search == null)
     {
         return(PizzaStoreMapper.Map(_db.Users.Include(o => o.Orders).AsNoTracking()));
     }
     else
     {
         return(PizzaStoreMapper.Map(_db.Users.Include(o => o.Orders)
                                     .AsNoTracking().Where(p => p.PhoneNumber.Contains(search))));
     }
 }
Пример #3
0
 public void AddUsertoDB(User user)
 {
     _db.Add(PizzaStoreMapper.Map(user));
 }
Пример #4
0
 public void AddUserPhoneNumber(User phone_Number)
 {
     _db.Add(PizzaStoreMapper.Map(phone_Number));
 }
Пример #5
0
 public void AddUserLastName(User last_Name)
 {
     _db.Add(PizzaStoreMapper.Map(last_Name));
 }
Пример #6
0
 public void AddUserFirstName(User first_Name)
 {
     _db.Add(PizzaStoreMapper.Map(first_Name));
 }
Пример #7
0
 public User GetUsersByID(int id)
 {
     return(PizzaStoreMapper.Map(_db.Users.Include(o => o.Orders)
                                 .AsNoTracking().First(y => y.UserIds == id)));
 }
 public void AddPizzas(Pizza p)
 {
     _db.Add(PizzaStoreMapper.Map(p));
 }
Пример #9
0
 public void AddOrder(Order order)
 {
     _db.Add(PizzaStoreMapper.Map(order));
 }
Пример #10
0
 public PizzaStore.Library.Order GetOrdersById(int id)
 {
     return(PizzaStoreMapper.Map(_db.Orders.Include(o => o.OrderId)
                                 .AsNoTracking().First(x => x.UserIds == id)));
 }
Пример #11
0
 public void AddLocation(PizzaStore.Library.Location location)
 {
     _db.Add(PizzaStoreMapper.Map(location));
 }
Пример #12
0
 public IEnumerable <PizzaStore.Library.Location> GetLocations(string search = null)
 {
     return(PizzaStoreMapper.Map(_db.Locations));
 }