53 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System.Collections.Generic;
 | |
| using System.Threading.Tasks;
 | |
| using System;
 | |
| using Datamodels.BusinessModels;
 | |
| using Datamodels.DatabaseModels;
 | |
| using Datamodels.SearchModels;
 | |
| using System.Linq.Expressions;
 | |
| 
 | |
| namespace Repositories.Interfaces
 | |
| {
 | |
|     public interface IFwMariaSearchRepo
 | |
|     {
 | |
|         Task<DataResult<List<Address>>> GetAllAddresses();
 | |
| 
 | |
|         /// <summary>
 | |
|         /// Get Filtered Data from DB Provider without sorting
 | |
|         /// </summary>
 | |
|         /// <param name="filter">Object describing filters</param>
 | |
|         /// <param name="skip">From row</param>
 | |
|         /// <param name="take">To Row (-1 for all rows)</param>
 | |
|         /// <param name="queryFieldDef">Table- and FieldDefinitions to load from</param>
 | |
|         /// <returns>Result Object with Result information and list of DataObjects</returns>
 | |
|         Task<DataResult<List<IEntityClass>>> GetFilteredData<T> (List<Expression> expressions, long skip = 0, long take = -1) where T: IEntityClass;
 | |
| 
 | |
|         /// <summary>
 | |
|         /// Get all Data from query field definition sorted by sortModel
 | |
|         /// </summary>
 | |
|         /// <param name="queryFieldDef">Table and Field Descriptions to Query from</param>
 | |
|         /// <param name="sortModel">Sorting Definitions</param>
 | |
|         /// <returns>Result Object with Result information and list of DataObjects</returns>
 | |
|         Task<object> GetAllSortedData (TableModel queryFieldDef, List<SortModel> sortModel);
 | |
| 
 | |
|         /// <summary>
 | |
|         /// Get filtered and sorted DB Provider with given range of records
 | |
|         /// </summary>
 | |
|         /// <param name="queryFieldDef">Table- and Field Description to Query from</param>
 | |
|         /// <param name="filter">Object describing filter</param>
 | |
|         /// <param name="sortModel">Sorting Definitions</param>
 | |
|         /// <param name="skip">From Row</param>
 | |
|         /// <param name="take">To Row (-1) for all rows</param>
 | |
|         /// <returns>Result Object with Result information and list of DataObjects</returns>
 | |
|         Task<object> GetDataFilteredAndSorted(List<FilterModel> filter, List<SortModel> sortModel, long skip=0, long take=-1);
 | |
| 
 | |
|         /// <summary>
 | |
|         /// Get Blob String from specific Field in specific Table - works only with id long fields
 | |
|         /// </summary>
 | |
|         /// <param name="tableName">Name of Table</param>
 | |
|         /// <param name="fieldName">Name of Field</param>
 | |
|         /// <param name="id">id value of Record</param>
 | |
|         /// <returns>String with Blob data</returns>
 | |
|         Task<string> GetBlobData(string tableName, string fieldName, long id);
 | |
|     }
 | |
| } |