Register or Login to Your Account
To implement repository method in C# using Entity Framework, below are the steps -
1. Create a new MVC project from Visual Studio.
2. Create your Context.cs and your entity class inside Model folder for database factory.
3. Verify the connection string in your web.config file.
4. Create a folder with name “Repository” inside your project. Add an interface and a class respectively to it.
5. Add a Controller which directly interact with Repository.
6. Create View for the Controller action methods.