You must Sign In to post a response.
  • Category: ASP.Net MVC

    How to work with entities in my controller


    i have create table with Employee database with emp table iam having entities with name Employee entities.

    but when i want to consume in controller iam not getting.

    in server explorer also showing Employee entities.
  • #761430
    Hai Dinesh,
    First you need to build your application and then you need to reference the dll of the Entity Framework project and then you need to add the namespace of your Entity Framework class to get the entity collection.
    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

  • #761435
    According to your statent you are doing "Database first" approach.
    I am not sure where you are for getting data from the database
    Basically you have to do the following

    1. You can create Model classes using "EF Designer from database". Using this models you can access the data in the controller.

    By Nathan
    Direction is important than speed

  • Sign In to post your comments