PHP等同于.Net实体框架 [英] PHP equivalent of .Net Entity Framework

查看:66
本文介绍了PHP等同于.Net实体框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢并且对.Net提供的EF非常满意,其中我可以首先进行编码,而数据库表是由框架本身生成的。等等。现在,我正在使用PHP编写个人站点。 PHP中是否有任何等效的东西会让我的生活更轻松。我不能选择.Net作为个人站点。答案是:(。

解决方案

使用代码优先方法,教义是:



文章:使用Doctrine 2.2.1和Composer进行代码优先的PHP



官方网站: http://www.doctrine-project.org/projects/orm .html



您还可以检查其他流行的PHP ORM,但是我不确定您是否可以像教义一样执行代码优先方法: / p>

http://propelorm.org/



http://redbeanphp.com/


I like and I am so comfortable with EF provided by .Net wherein I can code first and database tables are generated by the framework itself etc. I am now coding a personal site using PHP. Is there any equivalent thing in PHP which will make my life easier. I cannot choose .Net for personal site. That answer is out :(.

解决方案

With "Code-First" approach, Doctrine:

Article: Code First Approaching PHP with Doctrine 2.2.1 and Composer.

Official Website: http://www.doctrine-project.org/projects/orm.html

You can check also other popular PHP ORMs, but I'm not sure if you could do "code-first approach" as Doctrine:

http://propelorm.org/

http://redbeanphp.com/

这篇关于PHP等同于.Net实体框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆