public SuppliersModel EditSupplier(SuppliersModel model)
        {
            var supplier = _context.Suppliers.Attach(model);

            supplier.State = Microsoft.EntityFrameworkCore.EntityState.Modified;
            _context.SaveChanges();
            return(model);
        }
        public SuppliersModel DeleteSupplier(int Id)
        {
            SuppliersModel supplier = _context.Suppliers.Find(Id);

            if (supplier != null)
            {
                _context.Suppliers.Remove(supplier);
                _context.SaveChanges();
            }

            return(supplier);
        }
 public SuppliersModel AddSupplier(SuppliersModel model)
 {
     _context.Suppliers.Add(model);
     _context.SaveChanges();
     return(model);
 }