public new IEnumerable <TEntityDTO> SearchAll(ZOperationResult operationResult) { IEnumerable <TEntityDTO> result = new List <TEntityDTO>(); try { if (IsSearch(operationResult)) { result = ZDTOHelper <TEntityDTO, TEntity> .ToDTOList(Repository.SearchAll()); } } catch (Exception exception) { operationResult.ParseException(exception); } return(result); }
// GET: api/genre public IHttpActionResult GetGenres() { ZOperationResult operationResult = new ZOperationResult(); try { if (IsSearch(operationResult)) { return(Ok <IEnumerable <GenreDTO> >(ZDTOHelper <GenreDTO, Genre> .ToDTOList(Repository.SelectAll()))); } } catch (Exception exception) { operationResult.ParseException(exception); } return(new OperationResultActionResult(Request, operationResult)); }
public new IEnumerable <TEntityDTO> Search(ZOperationResult operationResult, Expression <Func <TEntity, bool> > where = null, Func <IQueryable <TEntity>, IOrderedQueryable <TEntity> > orderBy = null, int?skip = null, int?take = null, List <Expression <Func <TEntity, object> > > associations = null) { IEnumerable <TEntityDTO> result = new List <TEntityDTO>(); try { if (IsSearch(operationResult)) { return(ZDTOHelper <TEntityDTO, TEntity> .ToDTOList(Repository.Search(where, orderBy, skip, take, associations))); } } catch (Exception exception) { operationResult.ParseException(exception); } return(result); }
public new IEnumerable <TEntityDTO> Search(ZOperationResult operationResult, string where = null, object[] args = null, string orderBy = null, int?skip = null, int?take = null, List <string> associations = null) { IEnumerable <TEntityDTO> result = new List <TEntityDTO>(); try { if (IsSearch(operationResult)) { return(ZDTOHelper <TEntityDTO, TEntity> .ToDTOList(Repository.Search(where, args, orderBy, skip, take, associations))); } } catch (Exception exception) { operationResult.ParseException(exception); } return(result); }