public async Task EditShopServiceAsync(ShopServicesParam param) { var entity = await shopServicesRepository.GetByIdAsync(param.Id); entity.ServicesName = param.ServicesName; entity.PriceService = param.PriceService; entity.DescriptionService = param.DescriptionService; await shopServicesRepository.SaveChangesAsync(); }
public async Task AddNewShopServiceAsync(ShopServicesParam param) { var entity = new ShopServices() { ServicesName = param.ServicesName, PriceService = param.PriceService, DescriptionService = param.DescriptionService, ShopId = 1 }; await shopServicesRepository.AddAsync(entity); }
public async Task <IActionResult> EditShopService(ShopServicesParam param) { await maintenancetService.EditShopServiceAsync(param); return(RedirectToAction("ShopService")); }