5 Answers, 1 is accepted
0
Hi Jonathan,
Zoran
the Telerik team
Actually that seems to be misleading for the customers in our documentation. The complex types you refer to are not yet implemented in OpenAccess ORM, but they are on our future TODO list. We will change the terminology used in our documentation in the topics that "complex-types" are being mentioned.
Kind regards,Zoran
the Telerik team
0
Diego
Top achievements
Rank 1
answered on 17 Oct 2012, 12:26 AM
Is this feature (complex types) still not supported in the latest release? I'm having a hard time finding documentation about it.
With EF, I could make an entity that contained a compelx type as a property and properly map it to a table column in SQL server like so:
SQL: Person.Gender nvarchar(6)
public class Person
{
public virtual GenderADT Gender { get; set;}
}
[ComplexType]
public class GenderADT : ADTEnumBase<GenderEnum>
{
#region Constructors
public GenderADT() {}
public GenderADT(string pGender) : base(pGender) {}
public GenderADT(GenderEnum pEnumValue) : base(pEnumValue) {}
#endregion
[Column("Gender")]
[Required]
[StringLength(6, MinimumLength = 4)]
public override string Value { get; set; }
public static implicit operator GenderADT(GenderEnum pGender)
{
return new GenderADT(pGender);
}
public static implicit operator GenderADT(string pValue)
{
return new GenderADT(pValue);
}
}
With EF, I could make an entity that contained a compelx type as a property and properly map it to a table column in SQL server like so:
SQL: Person.Gender nvarchar(6)
public class Person
{
public virtual GenderADT Gender { get; set;}
}
[ComplexType]
public class GenderADT : ADTEnumBase<GenderEnum>
{
#region Constructors
public GenderADT() {}
public GenderADT(string pGender) : base(pGender) {}
public GenderADT(GenderEnum pEnumValue) : base(pEnumValue) {}
#endregion
[Column("Gender")]
[Required]
[StringLength(6, MinimumLength = 4)]
public override string Value { get; set; }
public static implicit operator GenderADT(GenderEnum pGender)
{
return new GenderADT(pGender);
}
public static implicit operator GenderADT(string pValue)
{
return new GenderADT(pValue);
}
}
0
Hello Diego,
I am afraid this feature is not implemented yet in the product.
I am sorry for the inconvenience caused.
Regards,
Damyan Bogoev
the Telerik team
I am afraid this feature is not implemented yet in the product.
I am sorry for the inconvenience caused.
Regards,
Damyan Bogoev
the Telerik team
Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
0
Diego
Top achievements
Rank 1
answered on 19 Oct 2012, 03:46 PM
Is it in the roadmap at all yet?
Also, if we implement a generic repository do you see any problem with using EF for some tables and OA for others? I'd like to have OA on most of it and I'll use EF where Telerik OA is lacking functionality like entities that require complex types defined and mapped to db.
Also, if we implement a generic repository do you see any problem with using EF for some tables and OA for others? I'd like to have OA on most of it and I'll use EF where Telerik OA is lacking functionality like entities that require complex types defined and mapped to db.
0
Hi Diego,
Damyan Bogoev
the Telerik team
The support for complex types is on our to-do list and we will consider it as a future improvement in the product.
You could both approaches but you should consider scenarios where you might need to load related data from entity which is managed by OpenAccess ORM context in an entity retrieved by EF context. You should try to avoid relations between these two setup in order to avoid runtime issues.
Hope that helps.
Damyan Bogoev
the Telerik team
Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.