Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Created Issue: Creating a code first model class can be made easier [646]

$
0
0

1. To create a code first model class , user typically has to do the below steps :
a. Create a base model class.
b. Add reference to system.data.entity.
c. Add a DBContext class wrapping it.
d. Make sure that there is a property ( and not field) in the base class which either has "Key" attribute or has property name as "Id" or "ClassNameId".
e. Add the connecting string in web.config ( which the user can un-comment or modify)

Expected:
While we have docs around doing this, it would be nice to auto-generate it like we auto generate controller and views. Right-click on "Model" shall show an option "Code First Model". Creating a code first model will do all the steps listed above.

User impact:
This avoids a bunch of steps for a getting started user.


Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>