コード例 #1
0
        public int CreateCat(CreateCatDto dto)
        {
            var c = new Cat(dto.Name);

            using (var uow = _uowFactory.Create())
            {
                _catRepository.Inject(uow);
                _catRepository.Save(c);
                uow.Flush();
            }
            return(c.Id);
        }