예제 #1
0
            private async Task <Domain.Marca> ObterMarcas(Command request)
            {
                if (!request.Id.HasValue)
                {
                    var marca = new Domain.Marca();

                    await _storeContext.AddAsync(marca);

                    return(marca);
                }

                return(await _storeContext
                       .Set <Domain.Marca>()
                       .FirstOrDefaultAsync(e => e.Id == request.Id));
            }
예제 #2
0
 private void MapearMarcas(Domain.Marca marcas, Command request)
 {
     marcas.Id        = request.Id.Value;
     marcas.Descricao = request.Descricao;
 }