Beispiel #1
0
        public CodeReviewCheckListAddOrUpdateResponseDto AddOrUpdate(CodeReviewCheckListAddOrUpdateRequestDto request)
        {
            var entity = _repository.GetAll()
                         .FirstOrDefault(x => x.Id == request.Id && x.IsDeleted == false);

            if (entity == null)
            {
                _repository.Add(entity = new Models.CodeReviewCheckList());
            }
            entity.Name = request.Name;
            _uow.SaveChanges();
            return(new CodeReviewCheckListAddOrUpdateResponseDto(entity));
        }
 public CodeReviewCheckListAddOrUpdateResponseDto(Models.CodeReviewCheckList entity)
     : base(entity)
 {
 }
Beispiel #3
0
 public CodeReviewCheckListDto(Models.CodeReviewCheckList entity)
 {
     Id   = entity.Id;
     Name = entity.Name;
 }