Repositories - SharePointPro/SpproEntity GitHub Wiki
Currently the Migration tool creates all repositories as the base SpproRepository object. Future updates will fix this problem and make use of the extended repositories classes.
To use the extended Document Library Repository, change the SpContext class from
public virtual SpproRepository<MyDocLibrary> MyDocLibrary { get; set; }
to
public virtual SpproDocLibraryRepository<MyDocLibrary> MyDocLibrary { get; set; }
SpproRepository
List Query(string queryString) - Query list via query string. example:
MyList.Query("ID=5"); //Get All items (Will throw an error if exceeds list threshold) unless you use an indexed column
MyList.Query("ID>=5||ID<=10"); //Or example
MyList.Query("Title=My Title&Name=John") //And Example
T GetById(int id)
List GetAll() Get All items (Will throw an error if exceeds list threshold)
int GetMaxID() - Returns the max id from the list
T UpdateOrCreate(T entity)
T Update(int id, string formData, string user = "")
void Delete(string formData)
T Create(string formData, string user = "")
SpproDocLibraryRepository
Folder CreateFolder(string fullFolderUrl)
List GetByFileName(string fileName)