Add property to a "topic" object (or news object)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
I want to add image for topic object and for news object..

there are more properties i wish to add but i dont think it matter
the point is:

how to add property for an object

what layers do i need to touch ?

what is best approach for such thing

vesion 1.9


----

i found this one
http://blogs.planetcloud.co.uk/mygreatdiscovery/post/How-to-extend-nopCommerce.aspx

but it didnt help to much

im using 1.9 and the part about update the update and insert functions seems only for 1.8



any way
i was sure that only to update the NopModel.edmx will be enough

but it seems it doesnt do the job..


so again with my question

how to add property ?
13 years ago
Add column in the db, update NopModel.edmx file, add property to the class, compile. so for Topic, you need to add property to Topic.cs
13 years ago
Seems to work..

but just for my understanding..


how come i need to write property for that ?

it seems the table mapping in edmx  find a mapping by it self to a property with the same name

so how come we need to write it our self

i know the edmx file doesn't suppose to generate code behind in nopcommerce but i don't understand how it find mapping by it self  therefor i don't understand why we need to write the property (well i wrote it because we MUST.. i just want to understand)
13 years ago
I suggest you to read http://msdn.microsoft.com/en-us/library/bb399567.aspx
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.