public Task <int> SubmitForm <TDto>(LabItemEntity entity, TDto dto) where TDto : class { if (!string.IsNullOrEmpty(entity.F_Id)) { entity.Modify(entity.F_Id); entity.F_LastModifyUserId = _usersService.GetCurrentUserId(); return(_service.UpdateAsync(entity, dto)); } else { entity.Create(); if (!entity.F_EnabledMark.HasValue) { entity.F_EnabledMark = true; } entity.F_CreatorUserId = _usersService.GetCurrentUserId(); return(_service.InsertAsync(entity)); } }
public Task <int> UpdateForm(LabItemEntity entity) { return(_service.UpdatePartialAsync(entity)); }