Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
I have created a MVC database 1st approaches therefore i need to map my own model to the view.

For an example:

Database 1st approach created database table name tbl_employee under the edmx.

I have created a class in the model named as Employee now i need to bind this Employee entity to my view.

How do i map the new class entity to my view?

C#
var employe= db.tblEmployee.Select(o =>  new { o.e_id, o.e_name, o.e_address, o.e_email, o.e_gender, o.e_phone, o.e_branch, o.e_course, o.e_batch });
Posted
Updated 14-Jul-16 1:20am
v3

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900