简体   繁体   English

与NOSQL相比,实体框架代码最适合RAD?

[英]Entity Framework code first is best for RAD compared to NOSQL?

I've been trying NOSQLwith C#. 我一直在用C#尝试NOSQL。 I'm also trying entity framework with SQL Server now. 我现在也在尝试使用SQL Server的实体框架。

For NOSQL databases(tried couchbase), I could simply use POCO without worrying about DB. 对于NOSQL数据库(尝试过couchbase),我可以简单地使用POCO而不用担心数据库。 Can Entity Framework code first provide a similar feature? Ent Entity Framework代码能否首先提供类似的功能?

Are any shortcuts to quickly develop apps fully based on POCO without getting deeply inside databases while using Entity framework just like it is for NOSQL databases such as Couchbase? 是否有任何快捷方式可以完全基于POCO开发应用程序,而无需深入内部数据库,同时使用Entity框架就像对于像Couchbase这样的NOSQL数据库?

Please advise a solution where I can focus only coding and leave the database to be totally taken care of by some framework. 请建议一个解决方案,我只关注编码,让数据库完全由一些框架处理。 I wish this is possible with SQL Server. 我希望SQL Server可以实现这一点。

Thanks. 谢谢。

Don't know about NOSQL, I haven't used them in actual projects. 不知道NOSQL,我还没有在实际项目中使用它们。 But I've been using EF Code First for some time now. 但是我一直在使用EF Code First。

I think it's pretty easy to code with EF Code First. 我认为使用EF Code First进行编码非常容易。 You just write POCO classes, add DBSet<T> properties into your Context class, and you're done. 您只需编写POCO类,将DBSet <T>属性添加到Context类中,您就完成了。 You can then query objects with linq, and inserting, updating, deleting is very easy too. 然后,您可以使用linq查询对象,并且插入,更新,删除也非常容易。

But then, when your POPO classes evolves, you may have to spend some time to learn about Migrations to update the database. 但是,当您的POPO课程发展时,您可能需要花一些时间来了解迁移以更新数据库。 It's a one time thing though, and only took several hours of learning for me to make it work. 这是一次性的事情,并且只花了几个小时的时间学习才能让它发挥作用。

So, imho, yes, you can develop apps fully based on POCO without getting deeply inside database. 所以,imho,是的,您可以完全基于POCO开发应用程序,而无需深入了解数据库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM