.NET MVC 3 Code First Database Mapping

I am trying to deploy .NET MVC3 application with no success. I have a datetime issue that I cannot fix. Let me explain:

I have installed Microsoft visual web developper 2010 in French. My localization in the control panel is French. When I first code my model and try to deploy my application, I see that my tables are being created with SQL_Latin1_General_CP1_CI_AS which means English localization! ??! Then I, of course, have a date issue in my database. How can I change the collation of the SQLserver Compact database in dev to match my production database? Why does EF create my tables with English sorting ??

thanks for the help

+3


source to share


1 answer


According to http://msdn.microsoft.com/en-us/library/ms174596(v=sql.90).aspx

All databases created without specifying a Windows collation are assigned Latin1_General, the default collation. Example: Latin1_General_CI_AS. This collation uses the general Latin1 collation rules, code page 1252. It is case insensitive and accent sensitive.



Since EF doesn't seem to support configuring this, I would suggest, if that's an option for you, install SQL Server Express and use it instead, since SQL Server Express supports alternate mappings by default.

+2


source







All Articles