SharePointPro Entity Framework

SharePointPro is proud to announce that we will be releasing our customised SharePoint Entity Framework to the Open Source Community.

SharePointPro entity Framework is a SharePoint First Entity Framework to simplify access to SharePoint Online or On Premises.

The Framework can automatically generate SharePoint lists as Entities and create a context with all the entity repository for quick access.

CRUD Actions have never been simpler.

Installation

  • Create your SharePoint Lists.
  • Download library and reference SpproFramework in your project.
  • Run SpproFramework.Migrate application and connect to your SharePoint Site. Select Lists and fields and create .cs entity files and Context
  • Instantiate SpContext and access your SharePoint list via a strongly typed created library.
  • Check out wiki https://github.com/SharePointPro/SpproEntity/wiki/SpproFrameWork-Migrate for pictures.

Example Code

 SecureString password = FetchPasswordFromConsole(); //Create Secure String Password
        try
          {
            using (var context = new ClientContext(webSPOUrl))  //Create Client Context using Shaerpoint URL
            {
                context.Credentials = new SharePointOnlineCredentials(userName, password);  //Use Credentials
                SpContext SpoContext = new SpContext(context); //Sp Context. Class Named via the SpproFramework GUI
                var property = SpContext.Properties.Query("Id=3")[0];  //Get First entity with ID = 3, Any field can be used to query
                property.Description = "My House"; //Update the Entity Property
                SpContext.UpdateOrCreate(property); //Save Change back to SharePoint
            }   
        }

More to come

Sppro Entity is still very much a work in progress. If you have any suggestion please contact me via my webpage. See more here: http://www.sharepointpro.com.au

I plan on introducing LINQ to framework.

 

Download

Download from GitHub – https://github.com/SharePointPro/SpproEntity

Binary solution to come soon.