Find Entity From Model Using Identifier in multiple tables by entity Framework RRS feed

  • Question

  • Hi All,


    I have the below scenario.

    I have three tables say for example products,categories,orders.

    All these tables have Identifier(new GUID()) column. 

    I created modle(ASP.NET MVC) calsses for the above three tables.

    Now what I'm expecting is if I pass identifier it must return the respective entity model.

    For example : if i pass identifier which is in products,it must return Products entity.

     if i pass identifier which is in orders,it must return orders entity.


    Can some one suggest me how can i achieve this.


    Thanks in advance


    Tuesday, December 13, 2011 2:23 PM