public User GetUser(int id) { DynamicDBContext data = new DynamicDBContext(); return(data.users.ToList().Find(x => x.UserID == id)); //throw new NotImplementedException(); }
public List <User> GetUser() { DynamicDBContext data = new DynamicDBContext(); return(data.users.ToList()); // throw new NotImplementedException(); }
public List <Vendor> GetVendor() { DynamicDBContext data = new DynamicDBContext(); return(data.vendors.ToList()); //throw new NotImplementedException(); }
public void AddVendor(Vendor vendor) { try { DynamicDBContext data = new DynamicDBContext(); data.vendors.Add(vendor); data.SaveChanges(); } catch (Exception) { // throw; } }
public void Add(Admin admin) { try { DynamicDBContext data = new DynamicDBContext(); data.admin.Add(admin); data.SaveChanges(); } catch (Exception) { // throw; } }
public void RemoveVendor(int id) { try { DynamicDBContext data = new DynamicDBContext(); Vendor user = data.vendors.ToList().Find(x => x.VendorId == id); data.vendors.Remove(user); data.SaveChanges(); } catch (Exception) { // throw; } }
public void Remove(int id) { try { DynamicDBContext data = new DynamicDBContext(); Admin user = data.admin.ToList().Find(x => x.Id == id); data.admin.Remove(user); data.SaveChanges(); } catch (Exception) { // throw; } }
public void AddUser(User users) { try { DynamicDBContext data = new DynamicDBContext(); data.users.Add(users); data.SaveChanges(); } catch (Exception) { // throw; } //throw new NotImplementedException(); }
public void UpdateVendor(Vendor user) { try { DynamicDBContext data = new DynamicDBContext(); data.Entry(user).State = System.Data.Entity.EntityState.Modified; // data.vendors.Add(user); data.SaveChanges(); } catch (Exception) { // throw; } }
public void Update(Admin admin) { // Admin user = data.admin.ToList().Find(x => x.Id == id); try { DynamicDBContext data = new DynamicDBContext(); data.Entry(admin).State = System.Data.Entity.EntityState.Modified; //data.admin.Add(user); data.SaveChanges(); } catch (Exception) { // throw; } }
public void RemoveUser(int id) { try { DynamicDBContext data = new DynamicDBContext(); User user = data.users.ToList().Find(x => x.UserID == id); data.users.Remove(user); data.SaveChanges(); } catch (Exception) { // throw; } //throw new NotImplementedException(); }
public Vendor GetVendor(int Id) { DynamicDBContext data = new DynamicDBContext(); return(data.vendors.ToList().Find(x => x.VendorId == Id)); }
public Admin GetAdmin(int Id) { DynamicDBContext data = new DynamicDBContext(); return(data.admin.ToList().Find(x => x.Id == Id)); }
public List <Admin> GetAdmin() { DynamicDBContext data = new DynamicDBContext(); return(data.admin.ToList()); }