public async Task <IEnumerable <Supplier> > GetAllSuppliers() { using (var db = new biusoprojectContext()) { try { return(await db.Supplier.ToListAsync()); } catch { throw; } } }
public async Task <bool> AddSupplier(Supplier supplier) { using (var db = new biusoprojectContext()) { try { db.Supplier.Add(supplier); await db.SaveChangesAsync(); return(true); } catch { throw; } } }