Exemplo n.º 1
0
        public Task <ProductDto> GetProductAsync(IRequestDto <Guid> id)
        {
            var dto = list.FirstOrDefault(c => c.Id == id.GetId());

            return(dto.AsTask());
        }
Exemplo n.º 2
0
        public Task <CustomerDto> Get(IRequestDto <Guid> id)
        {
            var dto = list.FirstOrDefault(c => c.Id == id.GetId());

            return(dto.AsTask());
        }
 public TDto Get <TDto>(IRequestDto <Guid> key, bool include = true, bool select = true)
     where TDto : IDto <Guid>
 => list.FirstOrDefault(c => c.Id == key.GetId()).MapTo <TDto>();
 public Task <ProductDto> GetProductAsync(IRequestDto <Guid> key)
 => list.FirstOrDefault(c => c.Id == key.GetId()).MapTo <ProductDto>().AsTask();
 public Customer Get(IRequestDto <Guid> key, bool include = true, bool select = true)
 => list.FirstOrDefault(c => c.Id == key.GetId());