📄 class.format
字号:
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
namespace {0}
{
/// <summary>
/// Main entry point into the database.
/// 'Get' calls fetch data using the QueryCriteria object.
/// 'New' calls create new objects/rows.
/// The CommitAll() function will need to be called at the end.
/// </summary>
/// <example>
/// Example of retrieving a contact and some of it's child rows from the database.
/// <code>
/// DataManager dm = new DataManager(Config.Dsn);
/// dm.QueryCriteria.And(JoinPath.Contact.Teacher.Schedule.Columns.Duration,30,MatchType.GreaterOrEqual);
/// Contact c = dm.GetContact(FetchPath.Contact.Teacher.All);
/// </code>
/// Example of an insert
/// <code>
/// DataManager dm = new DataManager(Config.Dsn);
/// Contact c = dm.NewContact();
/// dm.CommitAll();
/// </code>
/// Example of fetching a collection of rows
/// <code>
/// DataManager dm = new DataManager(Config.Dsn);
/// ContactCollection c = dm.GetContactCollection(FetchPath.Contact.Teacher.All);
/// </code>
/// </example>
public class DataManager : OrmLib.DataManagerBase
{
/// <summary>
/// Constructor for dsn.
/// </summary>
public DataManager(string dsn) : base(dsn, {0}.OrmDataSet.NewDataSet()){}
/// <summary>
/// Constructor for connections.
/// </summary>
public DataManager(System.Data.SqlClient.SqlConnection connection) : base(connection, {0}.OrmDataSet.NewDataSet()){}
/// <summary>
/// Constructor for transactions.
/// </summary>
public DataManager(System.Data.SqlClient.SqlTransaction transaction) : base(transaction, {0}.OrmDataSet.NewDataSet()){}
/// <summary>
/// Lookup object for static tables
/// </summary>
/// <remarks>
/// This is an internal field and should not be used.
/// </remarks>
internal {0}.Lookups lookups;
/// <summary>
/// Fetches the lookup object
/// TODO: refresh the lookup object
/// </summary>
/// <remarks>
/// This is an internal method and should not be used.
/// </remarks>
/// <returns></returns>
internal {0}.Lookups GetLookups()
{
if (lookups == null)
{
lookups = new {0}.Lookups(this.Dsn);
}
return lookups;
}
{1}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -