static void AddCustomer() { NCustomer customer = new NCustomer(); customer.UserId = 1; customer.CompanyName = "Company 1"; CustomerManager customerManager = new CustomerManager(new EfCustomerDAL()); customerManager.Add(customer); Console.WriteLine(customerManager); }
public IActionResult Delete(NCustomer customer) { var result = _iCustomerService.Delete(customer); if (result.Success == true) { return(Ok(result)); } return(BadRequest(result)); }
public IResult Update(NCustomer customer) { _iCustomerDal.Update(customer); return(new SuccessResult(Messages.CustomerUpdated)); }
public IResult Delete(NCustomer customer) { _iCustomerDal.Delete(customer); return(new SuccessResult(Messages.CustomerDeleted)); }
public IResult Add(NCustomer customer) { _iCustomerDal.Add(customer); return(new SuccessResult(Messages.CustomerAdded)); }