|
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows.Forms;
using System.Windows;
using System.Threading;
using System.Reflection;
using System.Diagnostics;
using System.Text;
using System.Net;
using System.IO;
using System.Data;
using System.Data.Common;
using BrainTechLLC.DAL;
namespace DALSampleApplication
{
/// <summary>
/// Demonstrates reading a connection string from the ConnectionStrings section of app.config or web.config
/// </summary>
[TableName("UserInfo"), CollectionCacheable, PrepopulateCache(false)]
[DataTransportType(DataTransport.SqlDirectConnection), IDALDatabaseClassName("DALSqlServer")]
[ReadConnectionStringFromConnectionStringKey("DBConnectionString")]
public partial class UserInfo : DBLayer<UserInfo>, IDBLayer<UserInfo>, INotifyPropertyChanged
{
private long _user_id;
private string _login_name = String.Empty;
private string _password = String.Empty;
[MappedToColumn, Identity, PrimaryKey, QuickLookup]
public long user_id
{
get { return _user_id; }
set { Set<long>(ref _user_id, "user_id", value); }
}
[MappedToColumn("login_name"), LimitTextLength(50)]
public string login_name
{
get { return _login_name; }
set { SetString(ref _login_name, "login_name", value); }
}
[MappedToColumn("password"), LimitTextLength(50)]
public string password
{
get { return _password; }
set { SetString(ref _password, "password", value); }
}
public static DALColumn<long> Col_user_id { get { return new DALColumn<long>("user_id"); } }
public static DALColumn<string> Col_login_name { get { return new DALColumn<string>("login_name"); } }
public static DALColumn<string> Col_password { get { return new DALColumn<string>("password"); } }
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Currently working as a Senior Silverlight Developer with Troppus Software in Superior, CO. I enjoy statistics, programming, new technology, playing the cello, and reading codeproject articles.