??xml version="1.0" encoding="utf-8" standalone="yes"?>91精品国产91久久久久久最新毛片 ,亚洲男男av,1024视频在线http://www.aygfsteel.com/enzosoft/category/38039.html??!?..zh-cnWed, 04 Mar 2009 07:32:17 GMTWed, 04 Mar 2009 07:32:17 GMT60DbEntry.Net (Lephone Framework) 3http://www.aygfsteel.com/enzosoft/archive/2009/03/04/257771.htmlEnzosoftEnzosoftWed, 04 Mar 2009 05:07:00 GMThttp://www.aygfsteel.com/enzosoft/archive/2009/03/04/257771.htmlhttp://www.aygfsteel.com/enzosoft/comments/257771.htmlhttp://www.aygfsteel.com/enzosoft/archive/2009/03/04/257771.html#Feedback0http://www.aygfsteel.com/enzosoft/comments/commentRss/257771.htmlhttp://www.aygfsteel.com/enzosoft/services/trackbacks/257771.html
原作者信?/legend>目首页Q?a target="_blank" >http: //dbentry.codeplex.com/
Homepage, Blog(Chinese version 点睛工作? and email:

转蝲规则Q?/legend>

源码
  • Dbentry.Net源码
  • 本篇源码


  • 基本操作 Basic CRUD



    在进行此ơ操作之前,我们先创Z个数据库:Sample3.Mdb Q依然将它放在C盘根目录下,q且创徏一个名为Users的表Q表有两个字D,一个IDQ一个NameQ其中ID是主键,且是“自动~号”。然后向里边插入两条数据。此Ӟ表是q个样子?

     ID  Name
     1  elephant
     2  elephant1


    #CRUD:create, retrieve, update, and delete。创建(插入Q,查询Q更斎ͼ删除Q这是标准的数据库操作。在我们Ҏ据库的操作中Q针Ҏ一个对象的操作基本都是CRUD?/span>


    好,开始我们的操作Q首先是查询Q?/span>


    一Q查?/span>



    1.ҎID查询一条数?/span>


    查询一条数?/span>

    输出是这LQ?/span>

    The first data is:{ Id = 1, Name = elephant }

    q样Q我们就从数据表Users中查询到了ID?的一条数据?/span>

    2.查询数据表中的所有数?/span>


    查询所有数?/span>

    输出为:


    { Id = 1, Name = elephant }

    { Id = 2, Name = elephant1}


    #WhereCondition.EmptyCondition 表示一个空的条Ӟx条g

    #DbEntry.From<Users>().Where(WhereCondition.EmptyCondition).Select();

    #q里的Select()q回的是一个DbObjectList<T>Q单从字面理解,我们的Userscȝ承了DbObjectQ那么返回的q个DbObjectList是一个DbObject的List



    二.更新



    我们第二条数据的Name字段修改?#8220;enzosoft”Q?/span>

        

    更新操作

    #q段代码是这样工作的Q?/span>

    首先取得一个ID?的对象uQ然后将u的Name属性修改ؓ“enzosoft”Q然后进行保存?/span>

    现在表中的数据ؓQ?/span>

     ID  Name
     1  elephant
     2  enzosoft


    三.插入



    我们在上一中Q已l明地使用了插入,现在Q?/span>

     

    插入操作

    q个׃多做解释了,表中的数据ؓQ?/span>

     ID  Name
     1  elephant
     2  enzosoft
     3  blogjava


    四.删除



    因ؓ删除操作会媄响到我们的演C,所以就攑ֈ最后来说明了~


    1.删除一条数?/span>

    (我的Blog用户名太MQ我自己都不知道当时Z么会q么注册。。唉。。怨念啊~~)

    二话不说Q删了它Q?/span>

             

    删除操作

    Ok,怨念的用户名被我删掉了,此时表中的数据ؓ:

     ID  Name
     1  elephant
     3  blogjava

    2.删除所有符合条件的数据


    删除操作

    执行它,数据表中的数据ؓQ?/span>

     ID  Name
       

    #DbEntry.Delete<Users>(WhereCondition.EmptyCondition) 删除了一些数据,q些数据没有M判定条gQ则是所有的数据


    基本的CRUD操作已经介绍完毕~下一,我们l箋Dbentry.Net之旅~



    Enzosoft 2009-03-04 13:07 发表评论
    ]]>
    Lephone Library Public License 1.0http://www.aygfsteel.com/enzosoft/archive/2009/03/04/LLPL1.htmlEnzosoftEnzosoftWed, 04 Mar 2009 04:57:00 GMThttp://www.aygfsteel.com/enzosoft/archive/2009/03/04/LLPL1.html
    Copyright (C) 2008 Lephone Studio <http://llf.hanzify.org>
    Everyone is permitted to copy and distribute verbatim copies of this license document, but changing
    it is not allowed.

    0. Additional Definitions.
    As used herein, “this License” refers to version 1.0 of Lephone Library Public License.
    "The Library" refers to a covered work governed by this License, other than an Application or a
    Combined Work as defined below.
    "The Original Author" refers to the author/team who created the project.
    An "Application" is any work that makes use of an interface provided by the Library, but which is
    not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed
    a mode of using an interface provided by the Library.

    1. Basic Permissions
    All rights granted under this License are granted for the term of copyright on the Program, and are
    irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited
    permission to run the unmodified Program. The output from running a covered work is covered by
    this License only if the output, given its content, constitutes a covered work. This License
    acknowledges your rights of fair use or other equivalent, as provided by copyright law.
    You may make, run and propagate covered works that you do not convey, without conditions
    so long as your license otherwise remains in force. You may convey covered works to others for
    the sole purpose of having them make modifications exclusively for you, or provide you with
    facilities for running those works, provided that you comply with the terms of this License in
    conveying all material for which you do not control copyright. Those thus making or running the
    covered works for you must do so exclusively on your behalf, under your direction and control, on
    terms that prohibit them from making any copies of your copyrighted material outside their
    relationship with you.

    2. Conveying Verbatim Copies
    You may convey verbatim copies of the Program's source code as you receive it, in any medium,
    provided that you conspicuously and appropriately publish on each copy an appropriate copyright
    notice; keep intact all notices stating that this License apply to the code; keep intact all notices
    of the absence of any warranty; and give all recipients a copy of this License along with the
    Program.
    You may charge any price or no price for each copy that you convey, and you may offer support
    or warranty protection for a fee.

    3. Conveying Modified Versions
    You may convey modified version of The Library.
    But the following modification are NOT allowed:
        1. library title
        2. library description
        3. library company
        4. library product name
        5. library copyright
        6. library main version
        7. library file name
        8. etc of such infomation
    If you modified the code of The Library and convey it, it means you waive the rights of your
    modified code and contribute it to The Original Author. And you need send a full copy of the
    modified code to The Original Author before you convey it.
    Copy code from The Library to other project is NOT allowed.

    4. Disclaimer of Warranty
    THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
    EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
    PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
    OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
    PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
    YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

    Copyright (C) Lephone Studio 2008-7-22



    Enzosoft 2009-03-04 12:57 发表评论
    ]]>
    DbEntry.Net (Lephone Framework) 2http://www.aygfsteel.com/enzosoft/archive/2009/03/03/DbEntryNet2.htmlEnzosoftEnzosoftTue, 03 Mar 2009 09:11:00 GMThttp://www.aygfsteel.com/enzosoft/archive/2009/03/03/DbEntryNet2.htmlhttp://www.aygfsteel.com/enzosoft/comments/257620.htmlhttp://www.aygfsteel.com/enzosoft/archive/2009/03/03/DbEntryNet2.html#Feedback0http://www.aygfsteel.com/enzosoft/comments/commentRss/257620.htmlhttp://www.aygfsteel.com/enzosoft/services/trackbacks/257620.html
    原作者信?/legend>目首页Q?a target="_blank" >http: //dbentry.codeplex.com/
    Homepage, Blog(Chinese version 点睛工作? and email:

    转蝲规则Q?/legend>

    注意 本篇跟原作者的First application有一定出入?a href="/Files/enzosoft/DbEntrySourceCode.zip">源码下蝲  如果嫌我讲的啰嗦。。可以直接蟩?a href="#detail">DbEntry.Net 部分

    W一个程?/span>


    如果我们惌样做Q?/span>

    首先Q在Access数据库中动态创Z个名为Users的表Q然后,向表中插入一条数据?/span>

    那么Q我的做法是q样的:

    先用Access2003创徏一个名为Sample2n.mdb的数据库Qؓ了得整个过E和数据的变更比较清晎ͼ我将它放到C:"根目录下?/span>

    假设表的l构Q?nbsp;   [ID][Name] # IDZ键,且自动增?/em>

    E序的引用:


    E序的引?/span>

    #ADODB d引用->COM->Microsoft ActiveX Data Objects 2.8 Library

    #ADOX d引用->COM->Microsoft ADO Ext. 2.8 for DDL and Security


    创徏表的E序:


    创徏表的E序

    好了,现在我们来执行它:


    1 static void Main(string[] args)
    2 
    3         {
    4 
    5             CreateTable();
    6 
    7         }


    Ok,执行后,我们打开数据库,会发现多一个结构如下的Users表:
     ID  Name
       

    成功Q现在来做第二步Q向q个表中d一条数据,比如Elephant 攑ֈ里边?/span>


    向数据表中插入一条数?/span>

    执行它:


    1 static void Main(string[] args)
    2 
    3         {
    4 
    5             //CreateTable();
    6 
    7             InsertData();
    8 
    9         }

    再打开表数据库-->Users?
     ID  Name
     1  elephant

    实成功插入了一条数据?/span>



    q就是我在完成这么一个小的d时所做的十分复杂的工作,当然Q你的做法肯定比我简单,不过单不q它--DbEntryNet?/span>

    先用Access2003创徏一个名为Sample2n.mdb的数据库Q也它攑ֈC盘根目录?

    使用DbEntry.NetQ首先添加它的引用,在此ơ测试中Q只需dLephone.Data.dll ?/span>Lephone.Util.dll卛_?/span>

    #d引用->览->Lephone.Data.Dll   Lephone.Util.dll

    在项目中d一个应用程序配|文件?/span>

    #d->新徏?>应用E序配置文g->App.Config

    修改里边的内容ؓ:


    App.config

    然后我们新徏一个类,cd为我们的表名:Users

    然后输入如下内容:


    Users.cs

    q样来用它:


     1 static void Main(string[] args)
     2 
     3         {
     4 
     5             Users u = new Users();
     6 
     7             u.Name = "elephant";
     8 
     9             DbEntry.Insert(u);
    10 
    11         }

    OKQ结束了Q打开我们的数据库Sample2d.Mdb来查看:

     Id  Name
     1  elephant

    是不是感觉很奇Q?/span>

    我们来简要地分析一下这个程?


    首先Q我们设|了DbEntry.Net可以自动创徏数据表?/span>

    打开App.Config,可以看到如下内容Q?/span>

    <add key="AutoCreateTable" value="true" />

    q个配置的意义就在于让DbEntry.Net知道Q它是可以自动地d?/span>


    然后Q新建的cL件Users.cs.

    我们Z么要它命名为UsersQ现在我们仅仅需要知道,它跟我们的表名是一致的?/span>

    而且它承了DbObject

    1 public class Users : DbObject


    最后,我们q行?#8220;插入”操作?/span>


    1   Users u = new Users();
    2 
    3   u.Name = "elephant";
    4 
    5   DbEntry.Insert(u);


    OKQ我们的W一个程序就完成了,大家可以仔细地观察下每个文gQƈdq个目的主去查看原作者的文章?/span>

                                                     下一,我们l箋DbEntry.Net之旅~



    Enzosoft 2009-03-03 17:11 发表评论
    ]]>
    DbEntry.Net (Lephone Framework) 1http://www.aygfsteel.com/enzosoft/archive/2009/03/03/DbEntryNet1.htmlEnzosoftEnzosoftTue, 03 Mar 2009 05:34:00 GMThttp://www.aygfsteel.com/enzosoft/archive/2009/03/03/DbEntryNet1.htmlhttp://www.aygfsteel.com/enzosoft/comments/257536.htmlhttp://www.aygfsteel.com/enzosoft/archive/2009/03/03/DbEntryNet1.html#Feedback0http://www.aygfsteel.com/enzosoft/comments/commentRss/257536.htmlhttp://www.aygfsteel.com/enzosoft/services/trackbacks/257536.html

    DbEntry.Net  ?br />


    原作者信?/legend>目首页Q?a target="_blank" >http: //dbentry.codeplex.com/
    Homepage, Blog(Chinese version 点睛工作? and email:

    在翻译和扩充中用的规则Q?/legend>
    • 原文不做M改动Q直接翻?/li>
    • 扩充内容以*q行包围
    • Ҏ名词解释?标注

    转蝲规则Q?/legend>



    DbEntry.Net 介:

    DbEntry.Net (Lephone Framework) 是一个用?Net 2.0 ?nbsp;3.5 的,轻量U高性能的组件。它拥有清晰的、易用的~程接口。它ZADO.NETQƈ支持C#、VB.Net{多U开发语a。它qؓAsp.Net 2.0 ?nbsp;Ruby on Rails 的MVC 框架提供了一个数据源?/span>DbEntryDataSource,q有一个简易的IoC框架。最新的版本已经在如下数据库pȝ中测试通过Q?/span>


    Sql Server 2005 ExpressQ?/span>MySql 5.0Q?/span>SQLite 3Q?/span>Access 2003Q?/span>

    Firebird 2.1.0Q?/span>PostgreSQL 8.3.3 Q?/span>Oracle 10g express?/span>


    *在以后的译及测试中Q请注意q些l节?


    #IoC:译ؓ“反{控制”Q早期称为DIQ?/span>Dependency InjectionQ?依赖注入。是一个重要的、面向对象编E的、削q序耦合度的法则Q是一U设计模式?/span>


    用一个列表来单表qCq内容:

    · 目标用户QDevelopers

    · 开源协议:Mozilla Public License 1.1 (MPL 1.1)

    · 操作pȝQ?nbsp;32-bit MS Windows (NT/2000/XP)

    · ~程语言QC#, Visual Basic .NET

    · 主题Q?/span>Database Engines/Servers 

    · 支持语种Q?nbsp;Chinese (Simplified), English

    · .Netq_Q?nbsp;2.0 ?nbsp;3.5

    · 支持数据库系l:常见pȝQ?/span>*注意版本*Q?/span>


    Ҏ:

    · Linq技术的支持Q需?NET 3.5Q(Linq support (need .net 3.5)Q?/span>

    · q箋接口查询语法 (Fluent Interface query syntax)

    · Ruby On Rails 的ActiveRecord 语法支持Q?/span>RoR ActiveRecord style syntaxQ?/span>

    · 环境事务 Q?/span>Ambient transactionQ?/span>

    · 动态对?nbsp;QDynamic ObjectQ?/span>

    · 部分更新提交 QPartial UpdateQ?/span>

    · 1?Q?对多Q多对多 关系 Q?/span>1:1 1:Many Many:Many relationsQ?/span>

    · 数据表自动创?nbsp;Q?/span>Auto create tableQ?/span>

    · 防sql注入 Q?/span>Anti sql injectionQ?/span>

    · 多层数据源配|?nbsp;Q?/span>Multiple data sourceQ?/span>

    · 对象验证 QObject ValidationQ?/span>*待商?

    · Nullable 支持 Q?/span>Nullable SupportQ?/span>

    · DbEntryDataSource

    · ASP.NET 2.0 中的 Membership 支持 Q?/span>ASP.NET 2.0 Membership SupportQ?/span>

    · 内徏~存支持Q?/span>Built-in Cache SupportQ?/span>


    枯燥的说明是必要的,l束了说明,我们开始轻杄DbEntry.Net之旅!




    Enzosoft 2009-03-03 13:34 发表评论
    ]]>
    DbEntry.Nethttp://www.aygfsteel.com/enzosoft/archive/2009/03/02/257411.htmlEnzosoftEnzosoftMon, 02 Mar 2009 12:26:00 GMThttp://www.aygfsteel.com/enzosoft/archive/2009/03/02/257411.htmlhttp://www.aygfsteel.com/enzosoft/comments/257411.htmlhttp://www.aygfsteel.com/enzosoft/archive/2009/03/02/257411.html#Feedback0http://www.aygfsteel.com/enzosoft/comments/commentRss/257411.htmlhttp://www.aygfsteel.com/enzosoft/services/trackbacks/257411.htmlQ?br />
    作者信?/legend>目首页Q?a target="_blank" >http://dbentry.codeplex.com/
    Homepage, Blog(Chinese version 点睛工作? and email:


    最新版本下载地址http://dbentry.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=15535

    谢谢您给予的帮助?

    Enzosoft 2009-03-02 20:26 发表评论
    ]]>
    վ֩ģ壺 | | | Ϫ| ƽ| | ˳| | | ɽ| | | ¹| | | | | ̩| | ʡ| | | | ˳| | ̫| | ʡ| | | ʯɽ| ƽ| | | | | | | | ȫ| ʡ|