public OperationResult Delete(string Account_no, string Address_id) { var model = Rela_location_limitList.FirstOrDefault(t => t.Account_no == Account_no && t.Address_id == Address_id); Rela_location_limitRepository.Delete(model); return(new OperationResult(OperationResultType.Success, "successfully deleted")); }
public OperationResult Update(UpdateRela_location_limitModel model) { var entity = Rela_location_limitList.First(t => t.Account_no == model.Account_no && t.Address_id == model.Address_id); entity.Account_no = model.Account_no; entity.Address_id = model.Address_id; entity.Month_quota = model.Month_quota; entity.Month_sales = model.Month_sales; Rela_location_limitRepository.Update(entity); return(new OperationResult(OperationResultType.Success, "update completed")); }
public OperationResult Insert(Rela_location_limitModel model) { var entity = new Rela_location_limit { Account_no = model.Account_no, Address_id = model.Address_id, Month_quota = model.Month_quota, Month_sales = model.Month_sales, }; Rela_location_limitRepository.Insert(entity); return(new OperationResult(OperationResultType.Success, "Added successfully")); }