public void Save(User user) { using var context = new AltoTestContext(); context.Users.Add(user); context.SaveChanges(); }
public void Save(Warehouse warehouse) { using var context = new AltoTestContext(); context.Warehouses.Add(warehouse); context.SaveChanges(); }
public void Save(Category category) { using var context = new AltoTestContext(); context.ProductCategories.Add(category); context.SaveChanges(); }
public void Save(Product product) { using var context = new AltoTestContext(); context.Products.Add(product); context.SaveChanges(); }
public void Save(ProductsWarehouse productsWarehouse) { using var context = new AltoTestContext(); context.ProductsWarehouses.Add(productsWarehouse); context.SaveChanges(); }
public ICollection <UserRole> SearchAll() { using var context = new AltoTestContext(); try { return(context.UserRoles.ToList()); } catch (Exception) { return(new List <UserRole>()); } }
public ICollection <WarehouseState> SearchAll() { using var context = new AltoTestContext(); try { return(context.WarehouseStates.ToList()); } catch (Exception) { return(new List <WarehouseState>()); } }
public ICollection <User> SearchAll() { using var context = new AltoTestContext(); try { var matches = context.Users.ToList(); return(matches); } catch (Exception) { return(null); } }
public ICollection <User> Matching(string criteria) { using var context = new AltoTestContext(); try { var matches = from user in context.Users where user.Username == criteria select user ; return(matches.ToList());; } catch (Exception) { return(null); } }
public ICollection <Warehouse> SearchAll() { using var context = new AltoTestContext(); return(context.Warehouses.ToList()); }
public ICollection <Packing> SearchAll() { using var context = new AltoTestContext(); return(context.ProductPackingTypes.ToList()); }
public ICollection <Category> SearchAll() { using var context = new AltoTestContext(); return(context.ProductCategories.ToList()); }