开发者

Linq-to-sql dbml generator is not adding "s" for table properties of context

开发者 https://www.devze.com 2023-02-21 06:38 出处:网络
When I delete and load again an entity, i found many errors in code, looks like DataContext wrap for GetTable changed own name. For example I had name: i9 and table property was i9s. Now its \"i9\". W

When I delete and load again an entity, i found many errors in code, looks like DataContext wrap for GetTable changed own name. For example I had name: i9 and table property was i9s. Now its "i9". What option do this? And how to get bac开发者_如何学运维k?


Are you using SqlMetal (i.e, command line tool) to generate the classes? In SqlMetal add the /pluralize option. If you're using the LINQ to SQL designer it should do this by default.


Found an option in settings -> database (attention: can be hided by checkbox below) -> o/r designer -> plural = yes

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号