Let the navigation properties be interfaces

2 posts, 0 answers
  1. Kai
    Kai avatar
    1 posts
    Member since:
    Mar 2013

    Posted 10 Apr 2013 Link to this post

    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
  2. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 15 Apr 2013 Link to this post

    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 >>
  3. DevCraft banner
Back to Top