public KSociety.Com.App.Dto.Res.Remove.Common.TagGroup Execute(TagGroup request) { var commonTagGroup = _tagGroupRepository.Find(request.Id); //.GetAllTagGroup().SingleOrDefault(tag => tag.Id == request.Id); _tagGroupRepository.Delete(commonTagGroup); return(new KSociety.Com.App.Dto.Res.Remove.Common.TagGroup(_unitOfWork.Commit() > 0)); }
public KSociety.Com.App.Dto.Res.ModifyField.Common.TagGroup Execute(TagGroup request) { var commonTagGroup = _tagGroupRepository.Find(request.Id); //.GetAllTagGroup().SingleOrDefault(tagGroup => tagGroup.Id == request.Id); commonTagGroup?.ModifyField(request.FieldName, request.Value); var result = _unitOfWork.Commit(); return(new KSociety.Com.App.Dto.Res.ModifyField.Common.TagGroup(result > 0)); }
public Srv.Dto.Common.TagGroup GetTagGroupById(IdObject idObject, CallContext context = default) { Domain.Entity.Common.TagGroup tagGroup = null; _logger.LogTrace("Query Behavior: " + GetType().FullName + "." + System.Reflection.MethodBase.GetCurrentMethod()?.Name); try { tagGroup = _commonTagGroupRepository.Find(idObject.Id); } catch (Exception ex) { _logger.LogError("Query Behavior: " + GetType().FullName + "." + System.Reflection.MethodBase.GetCurrentMethod()?.Name + " " + ex.Message + " - " + ex.StackTrace); } return(new TagGroup(tagGroup.Id, tagGroup.Name, tagGroup.Clock, tagGroup.Update, tagGroup.Enable)); }