How to add additional data column in EF using ASP.Net MVC 2

Posted by Picflight on Stack Overflow See other posts from Stack Overflow or by Picflight
Published on 2010-04-16T17:47:39Z Indexed on 2010/04/16 17:53 UTC
Read the original article Hit count: 282

My Table:

[LocationId]  
[Address]  
[ZipCode]

When I show a list of Location's, I also want to show the distance from a given zip code.
In Asp.Net Web Forms I had a stored procedure that would return the distance and I would call this SP on ItemDataBound on my GridView.

Or, I also would have my SP that is returning the Location list add another column ([Distance]) which I could display in my GridView.

How would you do this using Entity Framework and Asp.Net Mvc 2?

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about entity-framework