Exemplo n.º 1
0
        public async Task <Guid> CreateHeroAsync(CreateHeroRequest request)
        {
            var hero = _mapper.Map <Hero>(request);

            await _context.AddAsync(hero);

            await _context.SaveChangesAsync();

            return(hero.Id);
        }
 public async Task Add <T>(T entity) where T : class
 {
     await _heroContext.AddAsync(entity);
 }