This project is read-only.

is it possible to map a subset of columns to entity

Oct 8, 2009 at 10:49 PM
Edited Oct 8, 2009 at 11:32 PM

Good afternoon,

I am using linqToVFP to map a table Customer to an entity class , I would like a subset of columns to be mapped . Is it possible at all ?

The original VfpDatabaseContainer has been extended and attributs are defined, but I got the following error :

base {System.SystemException} = {"Cannot construct type 'Entities.Customer' with all mapped includedMembers."}


        [Table(Name = "allcustomers")]
        [Column(Member = "Id", Name = "customerid", IsPrimaryKey = true, IsGenerated = false)]
        [Column(Member = "StoreNum", Name = "Storenum")]
        //[Association(Member = "Category", KeyMembers = "CategoryID", RelatedEntityID = "Categories", RelatedKeyMembers = "CategoryID")]
        public virtual IEntityTable<Customer> Customer
                return base.Customer;
Oct 9, 2009 at 12:17 AM

Well I managed to make it work by changing the setter of customer.Id from private to public.