Purpose of edmgen validation? Comparing SSDL and database schemas?

血红的双手。 提交于 2019-12-10 11:45:51

问题


Not sure what the EDMGEN is validating here

It validates the ssdl file against a live database schema looking for inconsistencies)?

Ot it only validates the internal consistency between the ssdl, csdl and msl files?

If nobody has changed manually the contents of the autogenerated ssdl, csdl and msl files is there any reason to validate them?

Is this validation the same that runs when "Validate On Build" property of the ConceptualEntityModel is set to true in visual studio?

Is there any way to check consistency between ssdl file and live database? (like new tables, diferents fields, foreign keys, etc...) A similar results like the ones provided by Redgate SQLCompare when comparing schemas...


回答1:


Ot it only validates the internal consistency between the ssdl, csdl and msl files?

It validates only EDMX file - it means consistency between SSDL, MSL and CSDL.

Is this validation the same that runs when "Validate On Build" property of the ConceptualEntityModel is set to true in visual studio?

Yes

Is there any way to check consistency between ssdl file and live database?

That is not purpose of EDMGEN validation or entity framework. If you have VS Premium or Ultimate edition you can use its database tools to compare two databases - that is mostly equivalent to RedGate's SQL Compare. I'm not sure if there is any tool to compare SSDL and the real database but what you usually only need is set of your integration tests which will validate that your database still works with your model.



来源:https://stackoverflow.com/questions/11843264/purpose-of-edmgen-validation-comparing-ssdl-and-database-schemas

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!