示例#1
0
        public Adotar CreateAdotar(Guid clientId, Guid animalId, DateTime dataAdocao)
        {
            var adotar = new Adotar
            {
                Id         = Guid.NewGuid(),
                ClienteId  = clientId,
                AnimalId   = animalId,
                DataAdocao = dataAdocao
            };

            return(adotar);
        }
示例#2
0
        public async Task <bool> ProcessAdotarAsync(Adotar adotar)
        {
            await adotarRepository.CreateAsync(adotar);

            return(await adotarRepository.SaveChangesAsync() > 0);
        }