The ObjectMapper .NET Project

Official blog of the AdFactum ObjectMapper .NET

Archive for the 'Attributes' Category

Attribute: [SelectFunction]

Posted by Gerhard Stephan on 21st March 2007

The SelectFunction attribute is used to define a database function that is called when selecting the object from database. This function might be used to get the last access date of an object in database. Have a look at the following example.

        /// <summary>

        /// Gets or sets the last read.

        /// </summary>

        /// <value>The last read.</value>

        [SelectFunction("GETDATE()")]

        public DateTime LastRead

        {

            get { return lastRead; }

            set { lastRead = value; }

        }

The created SQL looks like:

SELECT [DATABASEFUNCTION].* , GETDATE() as LASTREAD FROM [DATABASEFUNCTION]  WHERE [DATABASEFUNCTION].[ID]=’12fca955-12ba-4486-bf89-4bf92d6db13d’;

 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: [UpdateFunction]

Posted by Gerhard Stephan on 21st March 2007

 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: [InsertFunction]

Posted by Gerhard Stephan on 21st March 2007

 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: [BindPropertyTo]

Posted by Gerhard Stephan on 19th December 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 »

Attribute: [WeakReferenced]

Posted by Gerhard Stephan on 20th November 2006

1 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 5 (1 votes, average: 5 out of 5)
Loading ... Loading ...

Posted in Attributes | 1 Comment »

Attribute: [Unique]

Posted by Gerhard Stephan on 20th September 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 »

Attribute: [Required]

Posted by Gerhard Stephan on 7th September 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 »

Attribute: [StaticData]

Posted by Gerhard Stephan on 7th August 2006

1 Votes | Average: 3 out of 51 Votes | Average: 3 out of 51 Votes | Average: 3 out of 51 Votes | Average: 3 out of 51 Votes | Average: 3 out of 5 (1 votes, average: 3 out of 5)
Loading ... Loading ...

Posted in Attributes | No Comments »

Attribute: [Table]

Posted by Gerhard Stephan on 13th 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 »

Attribute: [PropertyLength]

Posted by Gerhard Stephan on 11th 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 | 1 Comment »