The ObjectMapper .NET Project

Official blog of the AdFactum ObjectMapper .NET

Archive for the 'Attributes' Category

Attribute: [PropertyName]

Posted by Gerhard Stephan on 11th July 2006

The attribute PropertyName is used to specify the column name of the database table.

This attribute is NOT necessary to store a property in database, but it is necessary if you want to specify a column name that is independent from the name of the property. That’s maybe the case if you want to map your class to an already existing database table.

            [PropertyName("CULTURE")]

            public string CultureKey

            {

                  get { return _culture; }

                  set { _culture = value; }

            }

 

 The example above stores the property "CultureKey" in a column named "Culture".

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Attributes | No Comments »

Attribute: [Ignore]

Posted by Gerhard Stephan on 7th July 2006

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Attributes | No Comments »