public void Update(UpdateSupplierDTO dto)
        {
            var supplier = _Db.Suppliers.SingleOrDefault(x => x.Id == dto.Id && !x.IsDelete);

            supplier.Email       = dto.Email;
            supplier.Mobile      = dto.Mobile;
            supplier.CompanyName = dto.CompanyName;
            supplier.Address     = dto.Address;
            supplier.CityId      = dto.CityId;
            _Db.Suppliers.Update(supplier);
            _Db.SaveChanges();
        }
Beispiel #2
0
 public IActionResult Update([FromForm] UpdateSupplierDTO dto)
 {
     _SupplierService.Update(dto);
     return(Ok(GetRespons()));
 }