public void Add(Room room) { room.AddEntity(); _context.Add(room); _context.SaveChanges(); }
public void Add(Bed bed) { bed.AddEntity(); _context.Add(bed); _context.SaveChanges(); }
public void Add(Note note) { note.AddEntity(); _context.Add(note); _context.SaveChanges(); }
public void Add(OutletViewModel outletVM) { Outlet outlet = new Outlet { Address = outletVM.Address, Name = outletVM.Name, Phone = outletVM.Phone, Longitude = outletVM.Longitude, Latitude = outletVM.Latitude }; outlet.AddEntity(); _context.Add(outlet); _context.SaveChanges(); }
public void Add(ServiceViewModel serviceViewModel) { Service service = new Service { ServiceName = serviceViewModel.ServiceName, Price = serviceViewModel.Price, Content = serviceViewModel.Content, Time = serviceViewModel.Time, ImgUrl = serviceViewModel.ImgUrl, ServiceTypeId = serviceViewModel.ServiceTypeId }; service.AddEntity(); _context.Add(service); _context.SaveChanges(); }