c# - Making Visual Studio 2012 generate singular table names from a model -


i created model database table in visual studio 2012, , generated controller class , views (create.cshtml, edit.cshtml, etc.) using entity framework. generation tool pluralizes table name. table name person, , generated table name persons.

is there way configure visual studio generate singular table name?

override onmodelcreating method , add:

protected override void onmodelcreating(dbmodelbuilder modelbuilder) {     modelbuilder.conventions.remove<pluralizingtablenameconvention>();     base.onmodelcreating(modelbuilder); } 

if using ado.net entity data model wizard, on last page select tables there checkbox option also. it's pretty annoying doesn't default using table names in database


Comments

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -