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)); }
private void MapearMarcas(Domain.Marca marcas, Command request) { marcas.Id = request.Id.Value; marcas.Descricao = request.Descricao; }