public async Task <ActionResult> GroupWashAdd([Bind(Include = "group")] GroupWashServicesView groupWash) { if (ModelState.IsValid) { GroupWashServicesBll groupWashServices = Mapper.Map <GroupWashServicesView, GroupWashServicesBll>(groupWash); await _groupWashServices.Insert(groupWashServices); return(RedirectToAction("GroupWashTable")); } return(View()); }
private GroupWashServices TransformAnEntity(GroupWashServicesBll entity) => Mapper.Map <GroupWashServicesBll, GroupWashServices>(entity);
public async Task Update(GroupWashServicesBll elementToUpdate) { _unitOfWork.GroupWashServicesUnitOfWork.Update(TransformAnEntity(elementToUpdate)); await _unitOfWork.Save(); }
public async Task Insert(GroupWashServicesBll element) { _unitOfWork.GroupWashServicesUnitOfWork.Insert(TransformAnEntity(element)); await _unitOfWork.Save(); }