Code First using different names and extra properties added to POCO RRS feed

  • Question

  • Hi,

    I am very new to EF and have a doubt in Code first. Suppose I have a data base already. There is a table named tbl_Product.

    The table contains Id (pk), Name, Qty as the fields. But when i create the POCO in my C# app, I created like as follows,

    class MyProduct


    int ProductId;

    string ProductName;

    int Quantity;

    int Price;   // This is an extra one i have added.


    If it is so, how EF will map and manage the save, update and delete operations if the names of the properties are different. ?

    Also how to manage the extra one added in the POCO class ? I don't want this xtra property to be mapped or added to db.

    Thanks in advance.

    Saturday, April 7, 2012 2:36 AM