This is a migrated thread and some comments may be shown as answers.

Let the navigation properties be interfaces

1 Answer 31 Views
Feature Requests
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kai
Top achievements
Rank 1
Kai asked on 10 Apr 2013, 01:36 PM
Hi,

great work, but why I cant use interfaces for the navigation properties?
nhibernate can map this, please implement it to :D

public interface IProduct
{
    int ProductID { get; set; }
    IList<IOrderDetail> OrderDetails { get; }
}
 
public interface IOrderDetail
{
    int OrderID { get; set; }
    IProduct Product { get; set; }
}

public partial class OrderDetail : IOrderDetail
{
    private int _orderID;
    public virtual int OrderID
    {
        get
        {
            return this._orderID;
        }
        set
        {
            this._orderID = value;
        }
    }
 
    private IProduct _product;
    public virtual IProduct Product
    {
        get
        {
            return this._product;
        }
        set
        {
            this._product = value;
        }
    }
     
}

public partial class Product : IProduct
{
    private int _productID;
    public virtual int ProductID
    {
        get
        {
            return this._productID;
        }
        set
        {
            this._productID = value;
        }
    }
 
    private IList<IOrderDetail> _orderDetails = new List<IOrderDetail>();
    public virtual IList<IOrderDetail> OrderDetails
    {
        get
        {
            return this._orderDetails;
        }
    }
     
}

that would be very nice :D

1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 15 Apr 2013, 01:08 PM
Hello Kai,

This setup is indeed not currently supported in the designer or in the fluent mapping API, although it is supported by the OpenAccess' runtime and the "Classic API". Please add your suggestion to our Ideas & Feedback portal, so other users can also see it and vote for it. This way we will know how important this functionality is for our customers and will be able to prioritize it and add it for implementation.

All the best,
Alexander
the Telerik team
Using Encrypted Connection Strings with Telerik OpenAccess ORM. Read our latest blog article >>
Tags
Feature Requests
Asked by
Kai
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Share this question
or