This seems to work

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 

open System.Data.Linq.Mapping 

[<Table(Name="Products")>]
type Product() =
    let mutable id = 0
    let mutable name = ""
    [<Column(IsPrimaryKey=true, AutoSync=AutoSync.OnInsert)>]
    member this.ID with get() = id
                   and set(x) = id <- x
    [<Column>]
    member this.Name with get() = name
                     and set(s) = name <- s

It looks like the attributes you want are in System.Data.Linq.Mapping. In System.Data.Linq there is a class Table<T> that was causing the confusing diagnostic.

By on 10/23/2009 8:25 AM ()

Brian,

Thanks for the extremely fast response. Best regards

Chris

By on 10/23/2009 8:29 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper