The common service interface only needs to inherit the base class to be able to use the
The references are as follows:
Interface ithemepageservice:idynamicservice<themepage> {}
You can use any of the above methods.
Resolve<ithemeconfigservice> (). GetList (r=>r.appname=="User")
Summary of common methods
/// <summary> ///Get list/// </summary> /// <param name= "predicate" >Query Criteria</param> /// <param name= "SortOrder" >Sorting Method</param> /// <returns></returns>Ienumerable<t> GetList (Expression<func<t,BOOL>> predicate =NULL, Expression<func<t,BOOL>> SortOrder =NULL); /// <summary> ///querying a single record/// </summary> /// <param name= "predicate" >Query Criteria</param> /// <returns></returns>T Getsingle (Expression<func<t,BOOL>>predicate); /// <summary> ///Delete System/// </summary> /// <param name= "predicate" >Query Criteria</param>Serviceresult Delete (Expression<func<t,BOOL>>predicate); /// <summary> ///Query Paging/// </summary> /// <param name= "Query" ></param> /// <param name= "predicate" ></param> /// <returns></returns>Pagedlist<t> getpagedlist (querymodel query, Expression<func<t,BOOL>> predicate =NULL); /// <summary> ///Number of statistics/// </summary> /// <param name= "predicate" ></param> /// <returns></returns> LongCount (Expression<func<t,BOOL>>predicate); /// <summary> ///Add a single entity/// </summary> /// <param name= "model" ></param> /// <returns></returns>Serviceresult ADD (T model); /// <summary> ///update a single entity/// </summary> /// <param name= "model" ></param> /// <returns></returns>Serviceresult Update (T model); /// <summary> ///Bulk Add multiple entities/// </summary> /// <param name= "model" ></param> /// <returns></returns>Serviceresult Addmany (ienumerable<t>soucre); /// <summary> ///Bulk update of multiple entities/// </summary> /// <param name= "model" ></param> /// <returns></returns>Serviceresult Updatemany (action<t> updateaction, Expression<func<t,BOOL>> predicate=NULL);
One line of code to add GetList, Getsingle, add, and other database operation methods