G
GuYuming
Guest
I use f# type provider as follows:
type dbSchema = SqlDataConnection<"Data Source=COS-20160926ISP\SP2013;Initial Catalog=IMPALA;Integrated Security=SSPI;">
let db = dbSchema.GetDataContext()
let orgs = query {
for ats_p_org in db.Ats_P_org do
select (ats_p_org)
}
And in C#, i can use the types generated. when i "Go To Definition" at one of the generated types in C#, i see something like follows:
[System.Data.Linq.Mapping.TableAttribute(Name = "ats.p_org")]
public class Ats_P_org : INotifyPropertyChanging, INotifyPropertyChanged
{
public Ats_P_org();
[System.Data.Linq.Mapping.ColumnAttribute(Name = "id", Storage = "_Id", DbType = "NChar(10)")]
public string Id { get; set; }
[System.Data.Linq.Mapping.ColumnAttribute(Name = "level", Storage = "_Level", DbType = "NChar(10)")]
public string Level { get; set; }
[System.Data.Linq.Mapping.ColumnAttribute(Name = "organizecode", Storage = "_Organizecode", DbType = "NChar(10) NOT NULL", CanBeNull = false, IsPrimaryKey = true)]
public string Organizecode { get; set; }
My question is: is it possible for the generated types "public class Ats_P_org : INotifyPropertyChanging, INotifyPropertyChanged" to inherat a custom base type or implement a custom interface.
I need this custom base type or custom interface so that i can reference any generated class with it.
update: i tried extend the generated class in F# like follows, however, the extended property cannot be access in C#:
type dbSchema.ServiceTypes.Ats_P_user with
member this.IdentifierForUserInFillClaimsForEntity = this.Loginname
Continue reading...
type dbSchema = SqlDataConnection<"Data Source=COS-20160926ISP\SP2013;Initial Catalog=IMPALA;Integrated Security=SSPI;">
let db = dbSchema.GetDataContext()
let orgs = query {
for ats_p_org in db.Ats_P_org do
select (ats_p_org)
}
And in C#, i can use the types generated. when i "Go To Definition" at one of the generated types in C#, i see something like follows:
[System.Data.Linq.Mapping.TableAttribute(Name = "ats.p_org")]
public class Ats_P_org : INotifyPropertyChanging, INotifyPropertyChanged
{
public Ats_P_org();
[System.Data.Linq.Mapping.ColumnAttribute(Name = "id", Storage = "_Id", DbType = "NChar(10)")]
public string Id { get; set; }
[System.Data.Linq.Mapping.ColumnAttribute(Name = "level", Storage = "_Level", DbType = "NChar(10)")]
public string Level { get; set; }
[System.Data.Linq.Mapping.ColumnAttribute(Name = "organizecode", Storage = "_Organizecode", DbType = "NChar(10) NOT NULL", CanBeNull = false, IsPrimaryKey = true)]
public string Organizecode { get; set; }
My question is: is it possible for the generated types "public class Ats_P_org : INotifyPropertyChanging, INotifyPropertyChanged" to inherat a custom base type or implement a custom interface.
I need this custom base type or custom interface so that i can reference any generated class with it.
update: i tried extend the generated class in F# like follows, however, the extended property cannot be access in C#:
type dbSchema.ServiceTypes.Ats_P_user with
member this.IdentifierForUserInFillClaimsForEntity = this.Loginname
Continue reading...