This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I have an entity that is mapped to a table. For example, Product. It has an assocation to another table mapped entity, called Supplier. Supplier is a collection. I reference the Supplier collection through Product.Suppliers Now, I want to have two additional ways to reference Supplier. I can setup database views for both of these. I can then drop those views onto the Supplier entity and reference them through an IQueryable, like: repository.UnitOfWork.Current.ProductSupplierArchived_V and repository.UnitOfWork.Current.ProductSupplierCurrent_V. What I really want to be able to do is reference Suppliers by using both Product.CurrentSuppliers Is this even remotely possible? (And I hope what I'm trying to do makes sense). Brad
|
|
|
That's not currently possible. It sounds useful and I've logged a feature request for it but I'm afraid it's not something we'll be able to implement in the short term. Obviously what you can do instead is add custom CurrentSuppliers and ArchivedSuppliers properties to the Product class (via a partial class), e.g. public IEnumerable<Supplier> CurrentSuppliers { You do end up going through the IQueryable but at least you can encapsulate it within the desired API. (Though note this would NOT support association-type operations such as product.CurrentSuppliers.Add(myNewSupplier).) |
|