现在开始 KeelKit 也可以生成 F#的 Model !

来源: 投稿
作者: 麦壳饼
2009-04-24

这个一个让使用F#进行函数式编程朋友的好消息, 现在开始, KeelKit 开始对F#进行了支持!已经能生成可以编译并可以使用Model了!

注意:由于F#并不支持使用窗体,和控件组,因此,不能生成表单。

下面是一个例子项目

/Files/KeelKit/FSharpDemo.rar

示例代码如下:

 

 

# light
// ------------------------------------------------------------------------------
//  <autogenerated>
//      This code was generated by a tool.
//      Runtime Version: 2.0.50727.3053
//
//      Changes to this file may cause incorrect behavior and will be lost if 
//      the code is regenerated.
//  </autogenerated>
// ------------------------------------------------------------------------------

//  生成日期:20090424111815
namespace  FSharpModel
    
# nowarn  " 49 "   //  uppercase argument names
     # nowarn  " 67 "   //  this type test or downcast will always hold
     # nowarn  " 66 "   //  this upcast is unnecessary - the types are identical
     # nowarn  " 58 "   //  possible incorrect indentation..
     # nowarn  " 57 "   //  do not use create_DelegateEvent
     # nowarn  " 51 "   //  address-of operator can occur in the code
     open  System
    
open  System.Collections.Generic
    
open  System.ComponentModel
    
open  System.Data
    
open  System.Text
    
open  Keel.ORM
    
    
exception  ReturnExceptione5371424bc9443bdb49f808fd3a22f28  of  obj
    
exception  ReturnNoneExceptione5371424bc9443bdb49f808fd3a22f28
    
    
type
        [<Keel.ORM.DataTableAttribute(
" tb_codsoftitem " ) >]
        
        tb_codsoftitem = 
class
            [<Microsoft.FSharp.Core.DefaultValueAttribute(
false ) >]
            
val   mutable  _CodFileMd5: string
            
            [<Microsoft.FSharp.Core.DefaultValueAttribute(
false ) >]
            
val   mutable  _FullName: string
            
            [<Microsoft.FSharp.Core.DefaultValueAttribute(
false ) >]
            
val   mutable  _SoftName: string
            
            [<Microsoft.FSharp.Core.DefaultValueAttribute(
false ) >]
            
val   mutable  _Version: string
            
            [<Microsoft.FSharp.Core.DefaultValueAttribute(
false ) >]
            
val   mutable  _Size: int
            
            [<Microsoft.FSharp.Core.DefaultValueAttribute(
false ) >]
            
val   mutable  _Created:System.DateTime
            
            [<Microsoft.FSharp.Core.DefaultValueAttribute(
false ) >]
            
val   mutable  _Score_Good: int
            
            [<Microsoft.FSharp.Core.DefaultValueAttribute(
false ) >]
            
val   mutable  _Score_Bad: int
            
            [<Microsoft.FSharp.Core.DefaultValueAttribute(
false ) >]
            
val   mutable  _Money: int
            
            [<Microsoft.FSharp.Core.DefaultValueAttribute(
false ) >]
            
val   mutable  _UploadDateTime:System.DateTime
            
            [<Microsoft.FSharp.Core.DefaultValueAttribute(
false ) >]
            
val   mutable  _PhoneTypes: string
            
            [<Microsoft.FSharp.Core.DefaultValueAttribute(
false ) >]
            
val   mutable  _PhoneOS: string
            
new ()  as  this =
                {
                }
            
            
abstract  CodFileMd5 :  string   with  get,set
            [<Keel.ORM.DataFieldAttribute(
" CodFileMd5 " " String " ) >]
            
default  this.CodFileMd5
                
with  get() :  string  =
                    ((this._CodFileMd5 :> obj) :?> 
string )
                
and  set(value: string ) : unit =
                    this._CodFileMd5 
<-  value
            
            
            
abstract  FullName :  string   with  get,set
            [<Keel.ORM.DataFieldAttribute(
" FullName " " String " ) >]
            
default  this.FullName
                
with  get() :  string  =
                    ((this._FullName :> obj) :?> 
string )
                
and  set(value: string ) : unit =
                    this._FullName 
<-  value
            
            
            
abstract  SoftName :  string   with  get,set
            [<Keel.ORM.DataFieldAttribute(
" SoftName " " String " ) >]
            
default  this.SoftName
                
with  get() :  string  =
                    ((this._SoftName :> obj) :?> 
string )
                
and  set(value: string ) : unit =
                    this._SoftName 
<-  value
            
            
            
abstract  Version :  string   with  get,set
            [<Keel.ORM.DataFieldAttribute(
" Version " " String " ) >]
            
default  this.Version
                
with  get() :  string  =
                    ((this._Version :> obj) :?> 
string )
                
and  set(value: string ) : unit =
                    this._Version 
<-  value
            
            
            
abstract  Size :  int   with  get,set
            [<Keel.ORM.DataFieldAttribute(
" Size " " Int32 " ) >]
            
default  this.Size
                
with  get() :  int  =
                    ((this._Size :> obj) :?> 
int )
                
and  set(value: int ) : unit =
                    this._Size 
<-  value
            
            
            
abstract  Created : System.DateTime  with  get,set
            [<Keel.ORM.DataFieldAttribute(
" Created " " DateTime " ) >]
            
default  this.Created
                
with  get() : System.DateTime =
                    ((this._Created :> obj) :?> System.DateTime)
                
and  set(value:System.DateTime) : unit =
                    this._Created 
<-  value
            
            
            
abstract  Score_Good :  int   with  get,set
            [<Keel.ORM.DataFieldAttribute(
" Score_Good " " Int32 " ) >]
            
default  this.Score_Good
                
with  get() :  int  =
                    ((this._Score_Good :> obj) :?> 
int )
                
and  set(value: int ) : unit =
                    this._Score_Good 
<-  value
            
            
            
abstract  Score_Bad :  int   with  get,set
            [<Keel.ORM.DataFieldAttribute(
" Score_Bad " " Int32 " ) >]
            
default  this.Score_Bad
                
with  get() :  int  =
                    ((this._Score_Bad :> obj) :?> 
int )
                
and  set(value: int ) : unit =
                    this._Score_Bad 
<-  value
            
            
            
abstract  Money :  int   with  get,set
            [<Keel.ORM.DataFieldAttribute(
" Money " " Int32 " ) >]
            
default  this.Money
                
with  get() :  int  =
                    ((this._Money :> obj) :?> 
int )
                
and  set(value: int ) : unit =
                    this._Money 
<-  value
            
            
            
abstract  UploadDateTime : System.DateTime  with  get,set
            [<Keel.ORM.DataFieldAttribute(
" UploadDateTime " " DateTime " ) >]
            
default  this.UploadDateTime
                
with  get() : System.DateTime =
                    ((this._UploadDateTime :> obj) :?> System.DateTime)
                
and  set(value:System.DateTime) : unit =
                    this._UploadDateTime 
<-  value
            
            
            
abstract  PhoneTypes :  string   with  get,set
            [<Keel.ORM.DataFieldAttribute(
" PhoneTypes " " String " ) >]
            
default  this.PhoneTypes
                
with  get() :  string  =
                    ((this._PhoneTypes :> obj) :?> 
string )
                
and  set(value: string ) : unit =
                    this._PhoneTypes 
<-  value
            
            
            
abstract  PhoneOS :  string   with  get,set
            [<Keel.ORM.DataFieldAttribute(
" PhoneOS " " String " ) >]
            
default  this.PhoneOS
                
with  get() :  string  =
                    ((this._PhoneOS :> obj) :?> 
string )
                
and  set(value: string ) : unit =
                    this._PhoneOS 
<-  value
        
end

 

展开阅读全文
0 收藏
分享
加载中
更多评论
0 评论
0 收藏
分享
返回顶部
顶部