public ServiceDataResult GetAll() { var samples = repository.AsQueryable() .Select(p => new { p.Id, p.Title }) .ToList(); return(ServiceDataResult.Success(samples)); }
public ServiceDataResult Get(string id) { var sample = repository.FindById(id); return(ServiceDataResult.Success(sample)); }