SQLProvider


SqlEntity

Namespace: FSharp.Data.Sql.Common
Attributes:
[<DataContract(Name = "SqlEntity", Namespace = "http://schemas.microsoft.com/sql/2011/Contracts")>]
[<DefaultMember("Item")>]

Constructors

ConstructorDescription
new(dc, tableName, columns)
Signature: (dc:ISqlDataContext * tableName:string * columns:ColumnLookup) -> SqlEntity

CompiledName: .ctor

Instance members

Instance memberDescription
x._State()
Signature: unit -> EntityState

CompiledName: set__State

x._State()
Signature: unit -> unit

CompiledName: get__State

x.Clone()
Signature: unit -> SqlEntity

Makes a copy of entity (database row), which is a new row with the same columns and values (except Id) If column primaty key is something else and not-auto-generated, then, too bad...

x.CloneTo(...)
Signature: (secondContext:ISqlDataContext * itemExistsAlready:bool) -> SqlEntity

Attach/copy entity to a different data-context. Second parameter: SQL UPDATE or INSERT clause?
UPDATE: Updates the exising database entity with the values that this entity contains. INSERT: Makes a copy of entity (database row), which is a new row with the same columns and values (except Id)

x.ColumnValues
Signature: seq<string * obj>

CompiledName: get_ColumnValues

x.DataContext
Signature: ISqlDataContext

CompiledName: get_DataContext

x.Delete()
Signature: unit -> unit
x.GetColumn(key)
Signature: key:string -> 'T
Type parameters: 'T
x.GetColumnOption(key)
Signature: key:string -> Option<'T>
Type parameters: 'T
x.GetPkColumnOption(keys)
Signature: (keys:string list) -> 'T list
Type parameters: 'T
x.HasColumn(key, comparison)
Signature: (key:string * comparison:StringComparison option) -> bool
x.HasValue(key)
Signature: key:string -> bool
x.MapTo(propertyTypeMapping)
Signature: (propertyTypeMapping:(string * obj -> obj) option) -> 'a
Type parameters: 'a
x.OnConflict()
Signature: unit -> OnConflict

Determines what should happen when saving this entity if it is newly-created but another entity with the same primary key already exists

CompiledName: set_OnConflict

x.OnConflict()
Signature: unit -> unit

Determines what should happen when saving this entity if it is newly-created but another entity with the same primary key already exists

CompiledName: get_OnConflict

x.SetColumn(key, value)
Signature: (key:string * value:'t) -> unit
Type parameters: 't
x.SetColumnOption(key, value)
Signature: (key:string * value:'?9224 option) -> unit
Type parameters: '?9224
x.SetColumnOptionSilent(key, value)
Signature: (key:string * value:'?9220 option) -> unit
Type parameters: '?9220
x.SetColumnSilent(key, value)
Signature: (key:string * value:'a) -> unit
Type parameters: 'a
x.SetData(data)
Signature: (data:seq<string * 'f>) -> unit
Type parameters: 'f
x.SetPkColumnOptionSilent(keys, value)
Signature: (keys:string list * value:'a option) -> unit
Type parameters: 'a
x.SetPkColumnSilent(keys, value)
Signature: (keys:string list * value:'a) -> unit
Type parameters: 'a
x.Table
Signature: Table

CompiledName: get_Table

Fork me on GitHub