ActiveRecord/Readme.html

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。


<body>
<h2>ActiveRecord Options</h2>

<li><b>ActiveRecordBase</b>- Useful if you want ActiveRecord support in a separate class from your entity.</li> 
<li><b>ActiveRecordBaseEntity</b> - Useful if want 1 class to have both Entity and ActiveRecord support.</li>
<br /><br />

<bold>** NOTE:</bold>
<pre>
This is really your personal preference and therefore 2 different ActiveRecord classes are supplied.
There is a 3rd way to get ActiveRecord functionality using Extension classes to provide CRUD
Create, Update, Delete, Retrieve methods as extension methods on the entity.

</pre>


<h2>ActiveRecordBase</h2>
This will give you only ActiveRecord functionality without extending from Entity.
This basically means you will have 2 classes:
 1 Class to represent the Entity as in "User".
 1 Class to represent the ActiveRecord features as in "Users".

ActiveRecord Support
<ul>
    <li> Create   </li>
    <li> Retrieve </li>
    <li> Update   </li>
    <li> Delete   </li>
    <li> Get      </li>
    <li> GetAll   </li>
    <li> FindXXX  </li>
</ul>


<h3>Example:</h3>
<pre>
public class User : Entity
{
    ...
}

public class Users : ActiveRecordBase
{
    ...
}

...
User user = new User("kishore");
Users.Save(user);

</pre>




<h2>ActiveRecordBaseEntity</h2>
<pre>
This derives from Entity so you get both the Entity functionality and the ActiveRecord functionality
This will allow you to have both ActiveRecord features and entity features in one class.
后面还有 45 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。