<rsd version="1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="http://archipelago.phrasewise.com/rsd">
  <service>
    <engineName>MyGet</engineName>
    <engineLink>http://www.myget.org/</engineLink>
    <dc:identifier>https://www.myget.org/F/ajeetx/</dc:identifier>
    <dc:owner>ajeetx</dc:owner>
    <dc:creator>ajeetx</dc:creator>
    <dc:title>Generic.Repository.EntityFramework</dc:title>
    <dc:description># Generic.Repository.EntityFramework ![GitHub release](https://img.shields.io/github/release/ajeetx/Generic.Repository.EntityFramework.svg?style=for-the-badge) ![Maintenance](https://img.shields.io/maintenance/yes/2018.svg?style=for-the-badge)
| ![GitHub Release Date](https://img.shields.io/github/release-date/ajeetx/Generic.Repository.EntityFramework.svg?style=plastic) | ![Website](https://img.shields.io/website-stable-offline-green-red/http/ajeetx.github.io/Generic.Repository.EntityFramework.svg?label=status&amp;style=plastic)| [![ajeetx MyGet Build Status](https://www.myget.org/BuildSource/Badge/ajeetx?identifier=31d9a1d6-0fc8-41e6-9548-b1543b791c30)](https://www.myget.org/)|[![Build Status](https://travis-ci.org/AJEETX/Generic.Repository.EntityFramework.png?branch=master&amp;style=for-the-badge)](https://travis-ci.org/AJEETX/Generic.Repository.EntityFramework) 


[![.Net Framework](https://img.shields.io/badge/DotNet-4.6.1-blue.svg?style=plastic)](https://www.microsoft.com/en-au/download/details.aspx?id=49981) | ![GitHub language count](https://img.shields.io/github/languages/count/ajeetx/Generic.Repository.EntityFramework.svg?style=plastic)| ![GitHub top language](https://img.shields.io/github/languages/top/ajeetx/Generic.Repository.EntityFramework.svg) |![GitHub repo size in bytes](https://img.shields.io/github/repo-size/ajeetx/Generic.Repository.EntityFramework.svg) 


## Database interaction made easy 
```
A simple dotnet application has to interact with database.
So as to do CRUD operation from .net application, 
the nuget package wrapper makes it quite easy by following the below steps.
```
&gt; nuget package **"Generic.Repository.EntityFramework"** is a wrapper around ORM  EntityFramework

&lt;hr /&gt;

#### Steps to use the  ![NuGet](https://img.shields.io/nuget/v/Generic.Repository.EntityFramework.svg) package 

 In VS2015 or above, Create .net application [**.net4.6.1**] to interact with Sql server database

 &gt;  1. Search nuget package with name **'Generic.Repository.EntityFramework'**.
 &gt;  2. Download the ![NuGet](https://img.shields.io/nuget/v/Generic.Repository.EntityFramework.svg)  through VS IDE  to install in your project.
&gt;   2. Create your EntityFramework DataModel, then tweak the DataModel as below

IDbContext type is inherited from the installed  ![NuGet](https://img.shields.io/nuget/v/Generic.Repository.EntityFramework.svg) package
```
using EntityFrameworkWrapper;       //add this reference
//DB is real data model created from database
public partial class DB : DbContext, IDbContext   
    { 
        public DB() : base("name=connectionstring"){} 
        IDbSet&lt;T&gt; IDbContext.Set&lt;T&gt;()
        {
            return base.Set&lt;T&gt;();
        }
        public int Save()
        {
            return base.SaveChanges();
        }
        ....
    }
```
&gt;   3.	Now all set, please add the below lines from your consuming object/component

```
using EntityFrameworkWrapper;using Unity;  //add these 2 references
public class ConsumeService
{
     ...
    void ConsumeMethod()
    {
           //get the Unity container
           var unitycontainer = UnityConfig.UnityContainer;
     
           // register your 'DataModel'
           unitycontainer.RegisterType&lt;IDbContext, DataModel&gt;(); 
     
           var dbManager=unitycontainer.Resolve&lt;IDBManager&gt;(); //get the db manager
     
	      //All wired up !!!
          DO YOUR CRUD OPERATION  &amp; Customer is the table name in DB; 
         
         //GET	
         var result=dbManager.GetRepository&lt;Customer&gt;().Get();  
       
         //FIND by id, where id is the primary key
	     var result=dbManager.GetRepository&lt;Customer&gt;().Find(id); 

         // ADD, custObj is the Customer object
	     var result=dbManager.GetRepository&lt;Customer&gt;().Add(custObj);

         // DELETE, custObj is the Customer object
	     var result=dbManager.GetRepository&lt;Customer&gt;().Delete(custObj);
     }
```

### Support or Contact

Having any trouble? Check out our [documentation](https://github.com/AJEETX/Generic.Repository.EntityFramework/blob/master/README.md) or [contact support](mailto:ajeetkumar@email.com) and we???ll help you sort it out.

|![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/ajeetx/Generic.Repository.EntityFramework.svg?label=pre-release) | ![Github commits (since latest release)](https://img.shields.io/github/commits-since/ajeetx/Generic.Repository.EntityFramework/latest.svg)| [![Downloads](https://img.shields.io/nuget/dt/Generic.Repository.EntityFramework.svg?label=nuget-download&amp;style=flat-square)](https://www.nuget.org/stats/packages/Generic.Repository.EntityFramework?groupby=Version) | [![Downloads](https://img.shields.io/myget/ajeetx/dt/Generic.Repository.EntityFramework.svg?style=flat-square&amp;label=myget-download)](https://www.myget.org/feed/azy/package/nuget/Generic.Repository.EntityFramework)|


 [![HitCount](http://hits.dwyl.io/ajeetx/EntityFrameworkWrapper/projects/1.svg)](http://hits.dwyl.io/ajeetx/EntityFrameworkWrapper/projects/1) | ![GitHub contributors](https://img.shields.io/github/contributors/ajeetx/Generic.Repository.EntityFramework.svg?style=plastic)|![license](https://img.shields.io/github/license/ajeetx/Generic.Repository.EntityFramework.svg?style=plastic)|</dc:description>
    <homePageLink>https://www.myget.org/Feed/Details/ajeetx/</homePageLink>
    <apis>
      <api name="nuget-v3-packages" blogID="" preferred="false" apiLink="https://www.myget.org/F/ajeetx/api/v3/index.json" />
      <api name="nuget-v2-packages" blogID="" preferred="true" apiLink="https://www.myget.org/F/ajeetx/api/v2/" />
      <api name="nuget-v1-packages" blogID="" preferred="false" apiLink="https://www.myget.org/F/ajeetx/api/v1/" />
    </apis>
  </service>
</rsd>