// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. namespace WixToolset.Dtf.WindowsInstaller.Linq { using System; /// /// Apply to a subclass of QRecord to indicate the name of /// the table the record type is to be used with. /// /// /// If this attribute is not used on a record type, the default /// table name will be derived from the record type name. (An /// optional underscore suffix is stripped.) /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] public class DatabaseTableAttribute : Attribute { /// /// Creates a new DatabaseTableAttribute for the specified table. /// /// name of the table associated with the record type public DatabaseTableAttribute(string table) { this.Table = table; } /// /// Gets or sets the table associated with the record type. /// public string Table { get; set; } } /// /// Apply to a property on a subclass of QRecord to indicate /// the name of the column the property is to be associated with. /// /// /// If this attribute is not used on a property, the default /// column name will be the same as the property name. /// [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] public class DatabaseColumnAttribute : Attribute { /// /// Creates a new DatabaseColumnAttribute which maps a /// record property to a column. /// /// name of the column associated with the property public DatabaseColumnAttribute(string column) { this.Column = column; } /// /// Gets or sets the column associated with the record property. /// public string Column { get; set; } } }