/examples/EFTester/Acme.TestModel/Business/Objects/LeftRightCollection.Generated.cs
C# | 1408 lines | 796 code | 146 blank | 466 comment | 92 complexity | 4c8def6f9db671deb128eee02f99bb3a MD5 | raw file
Possible License(s): JSON, CC-BY-SA-3.0
Large files files are truncated, but you can click here to view the full file
- using System;
- using System.Data;
- using System.Xml;
- using System.Collections;
- using System.Runtime.Serialization;
- using System.ComponentModel;
- using Acme.TestModel.Business.Rules;
- using Acme.TestModel.Business.SelectCommands;
- using Acme.TestModel.Domain.Objects;
- using Widgetsphere.Core.DataAccess;
- using Widgetsphere.Core.Util;
- using Widgetsphere.Core.Logging;
- using Widgetsphere.Core.Exceptions;
- using Acme.TestModel.Business.LINQ;
- using System.IO;
- using System.Collections.Generic;
- using System.Linq.Expressions;
- using System.Data.Linq;
- using System.Linq;
- using System.Text;
- using Widgetsphere.Core.EventArgs;
- using System.Text.RegularExpressions;
-
- namespace Acme.TestModel.Business.Objects
- {
- /// <summary>
- /// The collection to hold 'LeftRight' entities
- /// </summary>
- [Serializable()]
- internal partial class LeftRightCollection : Widgetsphere.Core.DataAccess.BusinessCollectionPersistableBase, Widgetsphere.Core.DataAccess.IPersistableBusinessCollection, System.IDisposable, System.ComponentModel.IListSource, System.Collections.IList, System.Collections.IEnumerator, System.Collections.Generic.IEnumerable<Acme.TestModel.Business.Objects.LeftRight>, Widgetsphere.Core.DataAccess.IWrappingClass
- {
- #region Member Variables
-
- internal DomainLeftRightCollection wrappedClass;
-
- /// <summary>
- /// The parent subdomain object
- /// </summary>
- protected SubDomain _subDomain = null;
-
- #endregion
-
- #region Constructor / Initialize
-
- internal LeftRightCollection(DomainLeftRightCollection classToWrap)
- {
- _subDomain = classToWrap.SubDomain;
- wrappedClass = classToWrap;
- }
-
- /// <summary>
- /// Constructor that enables you to specify a modifier
- /// </summary>
- /// <param name="modifier">Used in audit operations to track changes</param>
- public LeftRightCollection(string modifier)
- {
- _subDomain = new SubDomain(modifier);
- ResetWrappedClass((DomainLeftRightCollection)_subDomain.GetDomainCollection(Collections.LeftRightCollection));
- }
-
- /// <summary>
- /// The default constructor
- /// </summary>
- public LeftRightCollection()
- {
- _subDomain = new SubDomain(ConfigurationValues.GetInstance().Modifier);
- ResetWrappedClass((DomainLeftRightCollection)_subDomain.GetDomainCollection(Collections.LeftRightCollection));
- }
-
- #endregion
-
- #region Property Implementations
-
- /// <summary>
- /// Returns the internal object that this object wraps
- /// </summary>
- [System.ComponentModel.Browsable(false)]
- internal virtual object WrappedClass
- {
- get { return wrappedClass ; }
- set { wrappedClass = (DomainLeftRightCollection)value ; }
- }
-
- //WrappingClass Interface
- object Widgetsphere.Core.DataAccess.IWrappingClass.WrappedClass
- {
- get { return this.WrappedClass; }
- set { this.WrappedClass = value; }
- }
-
- /// <summary>
- /// Specifies a modifier string to be used in the audit functionality
- /// </summary>
- public string Modifier
- {
- get
- {
- try
- {
- return wrappedClass.Modifier;
- }
- catch (System.Data.DBConcurrencyException dbcex) { throw new Widgetsphere.Core.Exceptions.ConcurrencyException(GlobalValues.ERROR_CONCURRENCY_FAILURE, dbcex); }
- catch (System.Data.SqlClient.SqlException sqlexp) { if (sqlexp.Number == 547 || sqlexp.Number == 2627) throw new Widgetsphere.Core.Exceptions.UniqueConstraintViolatedException(GlobalValues.ERROR_CONSTRAINT_FAILURE, sqlexp); else throw; }
- catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); throw; }
- }
- internal set { wrappedClass.Modifier = value; }
- }
-
- /// <summary>
- /// A reference to the SubDomain that holds this collection
- /// </summary>
- public SubDomain SubDomain
- {
- get
- {
- try
- {
- return wrappedClass.SubDomain;
- }
- catch (System.Data.DBConcurrencyException dbcex) { throw new Widgetsphere.Core.Exceptions.ConcurrencyException(GlobalValues.ERROR_CONCURRENCY_FAILURE, dbcex); }
- catch (System.Data.SqlClient.SqlException sqlexp) { if (sqlexp.Number == 547 || sqlexp.Number == 2627) throw new Widgetsphere.Core.Exceptions.UniqueConstraintViolatedException(GlobalValues.ERROR_CONSTRAINT_FAILURE, sqlexp); else throw; }
- catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); throw; }
- }
- }
-
- /// <summary>
- /// Returns the number of items in this collection
- /// </summary>
- public override int Count
- {
- get
- {
- try
- {
- lock (wrappedClass.SubDomain)
- {
- DataTable dt = wrappedClass.GetChanges(DataRowState.Deleted);
- if (dt == null) return wrappedClass.Count;
- else return wrappedClass.Count - dt.Rows.Count;
- }
- }
- catch (System.Data.DBConcurrencyException dbcex) { throw new Widgetsphere.Core.Exceptions.ConcurrencyException(GlobalValues.ERROR_CONCURRENCY_FAILURE, dbcex); }
- catch (System.Data.SqlClient.SqlException sqlexp) { if (sqlexp.Number == 547 || sqlexp.Number == 2627) throw new Widgetsphere.Core.Exceptions.UniqueConstraintViolatedException(GlobalValues.ERROR_CONSTRAINT_FAILURE, sqlexp); else throw; }
- catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); throw; }
- }
- }
-
- /// <summary>
- /// Determines the type of object contained by this collection.
- /// </summary>
- public virtual Type ContainedType
- {
- get { return typeof(LeftRight); }
- }
-
- /// <summary>
- /// Determines the type of collection for this object.
- /// </summary>
- public virtual Collections Collection
- {
- get { return Collections.LeftRightCollection; }
- }
-
- #endregion
-
- #region Enumerator
-
- /// <summary>
- /// Gets or sets the element at the specified index.
- /// </summary>
- /// <param name="index">The zero-based index of the element to get or set. </param>
- /// <returns>The element at the specified index.</returns>
- public virtual LeftRight this[int index]
- {
- get
- {
- try
- {
- var internalEnumerator = this.GetEnumerator();
- internalEnumerator.Reset();
- int ii = -1;
- while(ii < index)
- {
- internalEnumerator.MoveNext();
- ii++;
- }
- var retval = (LeftRight)internalEnumerator.Current;
- if (retval.wrappedClass == null)
- {
- if (!((0 <= index) && (index < this.Count)))
- throw new IndexOutOfRangeException();
- else
- throw new Exception("The item is null. This is not a valid state.");
- }
- else return (LeftRight)internalEnumerator.Current;
- }
- catch (System.Data.DBConcurrencyException dbcex) { throw new Widgetsphere.Core.Exceptions.ConcurrencyException(GlobalValues.ERROR_CONCURRENCY_FAILURE, dbcex); }
- catch (System.Data.SqlClient.SqlException sqlexp) { if (sqlexp.Number == 547 || sqlexp.Number == 2627) throw new Widgetsphere.Core.Exceptions.UniqueConstraintViolatedException(GlobalValues.ERROR_CONSTRAINT_FAILURE, sqlexp); else throw; }
- catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); throw; }
- }
- }
-
- #endregion
-
- #region Methods
-
- /// <summary>
- /// Create a new object to later add to this collection
- /// </summary>
- public virtual LeftRight NewItem(int FleftId, int FrightId)
- {
- try
- {
- lock (wrappedClass.SubDomain)
- {
- return new LeftRight(wrappedClass.NewItem(FleftId, FrightId));
- }
- }
- catch (System.Data.DBConcurrencyException dbcex) { throw new Widgetsphere.Core.Exceptions.ConcurrencyException(GlobalValues.ERROR_CONCURRENCY_FAILURE, dbcex); }
- catch (System.Data.SqlClient.SqlException sqlexp) { if (sqlexp.Number == 547 || sqlexp.Number == 2627) throw new Widgetsphere.Core.Exceptions.UniqueConstraintViolatedException(GlobalValues.ERROR_CONSTRAINT_FAILURE, sqlexp); else throw; }
- catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); throw; }
- }
-
- /// <summary>
- /// Create a new object to later add to this collection
- /// </summary>
- public virtual LeftRight NewItem()
- {
- try
- {
- lock (wrappedClass.SubDomain)
- {
- return new LeftRight(wrappedClass.NewItem());
- }
- }
- catch (System.Data.DBConcurrencyException dbcex) { throw new Widgetsphere.Core.Exceptions.ConcurrencyException(GlobalValues.ERROR_CONCURRENCY_FAILURE, dbcex); }
- catch (System.Data.SqlClient.SqlException sqlexp) { if (sqlexp.Number == 547 || sqlexp.Number == 2627) throw new Widgetsphere.Core.Exceptions.UniqueConstraintViolatedException(GlobalValues.ERROR_CONSTRAINT_FAILURE, sqlexp); else throw; }
- catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); throw; }
- }
-
- /// <summary>
- /// Add a newly created entity to this collection.
- /// </summary>
- public virtual void AddItem(LeftRight item)
- {
- try
- {
- lock (wrappedClass.SubDomain)
- {
- wrappedClass.AddItem((DomainLeftRight)item.WrappedClass);
- }
- }
- catch (System.Data.DBConcurrencyException dbcex) { throw new Widgetsphere.Core.Exceptions.ConcurrencyException(GlobalValues.ERROR_CONCURRENCY_FAILURE, dbcex); }
- catch (System.Data.SqlClient.SqlException sqlexp) { if (sqlexp.Number == 547 || sqlexp.Number == 2627) throw new Widgetsphere.Core.Exceptions.UniqueConstraintViolatedException(GlobalValues.ERROR_CONSTRAINT_FAILURE, sqlexp); else throw; }
- catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); throw; }
- }
-
- /// <summary>
- /// Determines if the specified item exists in this list
- /// </summary>
- /// <param name="item"></param>
- /// <returns></returns>
- public virtual bool Contains(Acme.TestModel.Business.Objects.LeftRight item)
- {
- foreach (var o in this)
- {
- if (o == item) return true;
- }
- return false;
- }
-
- /// <summary>
- /// Determines the position in the list of the specified item, if it exists
- /// </summary>
- /// <param name="item"></param>
- /// <returns></returns>
- public virtual int IndexOf(Acme.TestModel.Business.Objects.LeftRight item)
- {
- int index = 0;
- foreach (var o in this)
- {
- if (o == item) return index;
- index++;
- }
- return -1;
- }
-
- #region IListSource Members
-
- bool System.ComponentModel.IListSource.ContainsListCollection
- {
- get { return true; }
- }
-
- System.Collections.IList System.ComponentModel.IListSource.GetList()
- {
- var list = new System.Collections.Generic.List<Acme.TestModel.Business.Objects.LeftRight>();
- list.AddRange(this);
- return list;
- }
-
- #endregion
-
- #region IList Members
-
- int System.Collections.IList.Add(object value)
- {
- if (!(value is Acme.TestModel.Business.Objects.LeftRight))
- throw new System.Exception("The specified type is not valid!");
- var item = value as Acme.TestModel.Business.Objects.LeftRight;
- this.AddItem(item);
- return this.Count;
- }
-
- void System.Collections.IList.Clear()
- {
- throw new System.NotImplementedException();
- }
-
- bool System.Collections.IList.Contains(object value)
- {
- if (!(value is Acme.TestModel.Business.Objects.LeftRight))
- throw new System.Exception("The specified type is not valid!");
- var item = value as Acme.TestModel.Business.Objects.LeftRight;
- return this.Contains(item);
- }
-
- int System.Collections.IList.IndexOf(object value)
- {
- if (!(value is Acme.TestModel.Business.Objects.LeftRight))
- throw new System.Exception("The specified type is not valid!");
- var item = value as Acme.TestModel.Business.Objects.LeftRight;
- return this.IndexOf(item);
- }
-
- void System.Collections.IList.Insert(int index, object value)
- {
- throw new System.NotImplementedException();
- }
-
- bool System.Collections.IList.IsFixedSize
- {
- get { return false; }
- }
-
- bool System.Collections.IList.IsReadOnly
- {
- get { return false; }
- }
-
- void System.Collections.IList.Remove(object value)
- {
- if (!(value is Acme.TestModel.Business.Objects.LeftRight))
- throw new System.Exception("The specified type is not valid!");
- var item = value as Acme.TestModel.Business.Objects.LeftRight;
- if (this.Contains(item))
- item.Delete();
- }
-
- void System.Collections.IList.RemoveAt(int index)
- {
- if ((0 <= index) && (index < this.Count))
- this[index].Delete();
- }
-
- object System.Collections.IList.this[int index]
- {
- get { return this[index]; }
- set { throw new System.NotImplementedException(); }
- }
-
- #endregion
-
- /// <summary>
- /// Takes an IVisitor object and iterates through each item in this collection
- /// </summary>
- /// <param name="visitor">The object that processes each collection item</param>
- public virtual void ProcessVisitor(IVisitor visitor)
- {
- if (visitor == null) throw new Exception("This object cannot be null.");
- lock(this)
- {
- foreach (IBusinessObject item in this)
- {
- visitor.Visit(item);
- }
- }
- }
-
- #region Static SQL Methods
-
- internal static string GetFieldAliasFromFieldNameSqlMapping(string alias)
- {
- alias = alias.Replace("[", string.Empty).Replace("]", string.Empty);
- switch (alias.ToLower())
- {
- case "fleft_id": return "fleftid";
- case "fright_id": return "frightid";
- default: throw new Exception("The select clause is not valid.");
- }
- }
-
- internal static string GetTableFromFieldAliasSqlMapping(string alias)
- {
- switch (alias.ToLower())
- {
- case "fleftid": return "LEFT_RIGHT";
- case "frightid": return "LEFT_RIGHT";
- default: throw new Exception("The select clause is not valid.");
- }
- }
-
- internal static string GetTableFromFieldNameSqlMapping(string field)
- {
- switch (field.ToLower())
- {
- case "fleft_id": return "LEFT_RIGHT";
- case "fright_id": return "LEFT_RIGHT";
- default: throw new Exception("The select clause is not valid.");
- }
- }
-
- internal static string GetRemappedLinqSql(string sql, string parentAlias, LinqSQLFromClauseCollection childTables)
- {
- sql = System.Text.RegularExpressions.Regex.Replace(sql, "\\[" + parentAlias + "\\]\\.\\[fleft_id\\]", "[" + childTables.GetBaseAliasTable(parentAlias, "LEFT_RIGHT") + "].[fleft_id]", RegexOptions.IgnoreCase);
- sql = System.Text.RegularExpressions.Regex.Replace(sql, "\\[" + parentAlias + "\\]\\.\\[fright_id\\]", "[" + childTables.GetBaseAliasTable(parentAlias, "LEFT_RIGHT") + "].[fright_id]", RegexOptions.IgnoreCase);
- return sql;
- }
-
- internal static string GetPagedSQL(List<LinqSQLField> fieldList, LinqSQLFromClauseCollection fromLinkList, string whereClause, object paging, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer)
- {
- var sb = new StringBuilder();
- var paging2 = (LeftRightPaging)paging;
-
- //Calculate the SELECT clause
- sb.Append("SELECT ");
- int index = 0;
- foreach (LinqSQLField field in fieldList)
- {
- sb.Append("[t0].[" + field.Name + "]");
- if (index < fieldList.Count - 1) sb.Append(", ");
- index++;
- }
- sb.AppendLine();
- sb.AppendLine("FROM (");
-
- //Calculate the Inner SELECT clause
- sb.Append("SELECT ");
- index = 0;
- foreach (var field in fieldList)
- {
- sb.Append(field.GetSQL(false));
- if (index < fieldList.Count - 1) sb.Append(", ");
- index++;
- }
- sb.AppendLine();
-
- //If there is no sort then add primary key
- if (paging2.OrderByList.Count == 0)
- {
- paging2.OrderByList.Add(new LeftRightPagingFieldItem(LeftRight.FieldNameConstants.FleftId));
- paging2.OrderByList.Add(new LeftRightPagingFieldItem(LeftRight.FieldNameConstants.FrightId));
- }
-
- //Determine the paging sort
- var isPrimary = false;
- var orderByClause = string.Empty;
- foreach (var fieldItem in paging2.OrderByList)
- {
- if (!string.IsNullOrEmpty(orderByClause)) orderByClause += ", ";
- switch (fieldItem.Field.ToString().ToLower())
- {
- case "fleftid": orderByClause += "[" + (from x in fieldList where x.Alias.ToLower() == fieldItem.Field.ToString().ToLower() select x).FirstOrDefault().Table + "].[fleft_id]" + (fieldItem.Ascending ? string.Empty : " DESC"); break;
- case "frightid": orderByClause += "[" + (from x in fieldList where x.Alias.ToLower() == fieldItem.Field.ToString().ToLower() select x).FirstOrDefault().Table + "].[fright_id]" + (fieldItem.Ascending ? string.Empty : " DESC"); break;
- default: throw new Exception("The order by clause is not valid.");
- }
- }
-
- //Get the primary key for predictable sorts
- string primarySortKey = string.Empty;
-
- sb.AppendLine(", ROW_NUMBER() OVER (ORDER BY " + orderByClause + ((primarySortKey == string.Empty) || ((isPrimary && (!string.IsNullOrEmpty(primarySortKey)))) ? string.Empty : ", " + primarySortKey) + ") AS Row");
- //Calculate the FROM clause
- index = 0;
- sb.Append("FROM ");
- foreach (LinqSQLFromClause fromClause in fromLinkList)
- {
- sb.Append("[" + fromClause.Schema + "].[" + fromClause.TableName + "] AS [" + fromClause.Alias + "] ");
- if (optimizer.NoLocking) sb.Append("WITH (NOLOCK)");
- if (!string.IsNullOrEmpty(fromClause.LinkClause)) sb.Append(fromClause.LinkClause + " ");
-
- if (index < fromLinkList.Count - 1)
- {
- sb.AppendLine();
- sb.Append("LEFT OUTER JOIN ");
- }
-
- index++;
- }
- sb.AppendLine();
-
- //Calculate the WHERE clause
- if (!string.IsNullOrEmpty(whereClause))
- {
- foreach (LinqSQLFromClause fromClause in fromLinkList)
- {
- //Only process table that were original and not inserted above
- if (fromClause.AnchorAlias == string.Empty)
- {
- whereClause = LinqSQLParser.GetRemappedLinqSql(fromClause, whereClause, fromLinkList, LinqSQLParser.ObjectTypeConstants.Table);
- }
- }
- sb.Append("WHERE " + whereClause);
- }
-
- sb.AppendLine(") AS [t0]");
- sb.AppendLine("WHERE (Row >= " + (((paging2.PageIndex - 1) * paging2.RecordsperPage) + 1) + ") AND (Row <= " + (paging2.PageIndex * paging2.RecordsperPage) + ")");
-
- return sb.ToString();
- }
-
- #endregion
-
- /// <summary>
- /// Persists this collection to store.
- /// </summary>
- public override void Persist()
- {
- try
- {
- foreach (LeftRight item in this)
- {
- if (item.wrappedClass.RowState != DataRowState.Unchanged)
- item.OnValidate(new BusinessObjectEventArgs(item));
- }
-
- lock (wrappedClass.SubDomain)
- {
- wrappedClass.Persist();
- }
- }
- catch (System.Data.DBConcurrencyException dbcex) { throw new Widgetsphere.Core.Exceptions.ConcurrencyException(GlobalValues.ERROR_CONCURRENCY_FAILURE, dbcex); }
- catch (System.Data.SqlClient.SqlException sqlexp) { if (sqlexp.Number == 547 || sqlexp.Number == 2627) throw new Widgetsphere.Core.Exceptions.UniqueConstraintViolatedException(GlobalValues.ERROR_CONSTRAINT_FAILURE, sqlexp); else throw; }
- catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); throw; }
- }
-
- /// <summary>
- /// Select all objects from store.
- /// </summary>
- public static LeftRightCollection RunSelect()
- {
- return RunSelect(ConfigurationValues.GetInstance().Modifier);
- }
-
- /// <summary>
- /// Select all objects from store.
- /// </summary>
- public static LeftRightCollection RunSelect(string modifier)
- {
- try
- {
- var returnVal = new LeftRightCollection(DomainLeftRightCollection.RunSelect(modifier));
- return returnVal;
- }
- catch (System.Data.DBConcurrencyException dbcex) { throw new Widgetsphere.Core.Exceptions.ConcurrencyException(GlobalValues.ERROR_CONCURRENCY_FAILURE, dbcex); }
- catch (System.Data.SqlClient.SqlException sqlexp) { if (sqlexp.Number == 547 || sqlexp.Number == 2627) throw new Widgetsphere.Core.Exceptions.UniqueConstraintViolatedException(GlobalValues.ERROR_CONSTRAINT_FAILURE, sqlexp); else throw; }
- catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); throw; }
- }
-
- /// <summary>
- /// Using the specified Where expression, execute a query against the database to return a result set
- /// </summary>
- /// <param name="where">The expression that determines the records selected</param>
- public static LeftRightCollection RunSelect(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where)
- {
- return RunSelect(where, ConfigurationValues.GetInstance().Modifier);
- }
-
- /// <summary>
- /// Using the specified Where expression, execute a query against the database to return a result set
- /// </summary>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="modifier">The modified audit trail</param>
- public static LeftRightCollection RunSelect(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, string modifier)
- {
- return RunSelect(where, new QueryOptimizer(), modifier);
- }
-
- /// <summary>
- /// Using the specified Where expression, execute a query against the database to return a result set
- /// </summary>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- /// <param name="modifier">The modified audit trail</param>
- public static LeftRightCollection RunSelect(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer, string modifier)
- {
- var subDomain = new SubDomain(modifier);
- var dc = new DataContext(ConfigurationValues.GetInstance().ConnectionString);
- var template = dc.GetTable<LeftRightQuery>();
- var cmd = BusinessCollectionPersistableBase.GetCommand<LeftRightQuery>(dc, template, where);
- cmd.CommandTimeout = ConfigurationValues.GetInstance().DefaultTimeOut;
- var parser = LinqSQLParser.Create(cmd.CommandText, LinqSQLParser.ObjectTypeConstants.Table);
- cmd.CommandText = parser.GetSQL(optimizer);
- dc.Connection.Open();
- var startTime = DateTime.Now;
- var result = dc.Translate<LeftRightQuery>(cmd.ExecuteReader());
- var endTime = DateTime.Now;
- optimizer.TotalMilliseconds = (long)endTime.Subtract(startTime).TotalMilliseconds;
- var retval = subDomain.GetCollection<LeftRightCollection>();
- var pkList = new HashSet<string>();
- foreach (var item in result)
- {
- var pk = item.SinglePrimaryKeyValue();
- if (!pkList.Contains(pk))
- {
- pkList.Add(pk);
- var newItem = retval.NewItem(item.FleftId, item.FrightId);
- LoadDataRow(item, newItem);
- retval.AddItem(newItem);
- }
- }
- retval.wrappedClass.AcceptChanges();
- retval.wrappedClass.EndLoadData();
- dc.Connection.Close();
- return retval;
- }
-
- /// <summary>
- /// Using the specified Where expression, execute a query against the database to return a result set
- /// </summary>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="paging">The paging object to determine how the results are paged.</param>
- public static LeftRightCollection RunSelect(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Acme.TestModel.Business.Objects.LeftRightPaging paging)
- {
- return RunSelect(where, paging, ConfigurationValues.GetInstance().Modifier);
- }
-
- /// <summary>
- /// Using the specified Where expression, execute a query against the database to return a result set
- /// </summary>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="paging">The paging object to determine how the results are paged.</param>
- /// <param name="modifier">The modified audit trail</param>
- public static LeftRightCollection RunSelect(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Acme.TestModel.Business.Objects.LeftRightPaging paging, string modifier)
- {
- return RunSelect(where, paging, new QueryOptimizer(), modifier);
- }
-
- /// <summary>
- /// Using the specified Where expression, execute a query against the database to return a result set
- /// </summary>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="paging">The paging object to determine how the results are paged.</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- /// <param name="modifier">The modified audit trail</param>
- public static LeftRightCollection RunSelect(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Acme.TestModel.Business.Objects.LeftRightPaging paging, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer, string modifier)
- {
- if (paging == null) throw new Exception("The paging object cannot be null.");
- var subDomain = new SubDomain(modifier);
-
- var dc = new DataContext(ConfigurationValues.GetInstance().ConnectionString);
- var template = dc.GetTable<LeftRightQuery>();
- var cmd = BusinessCollectionPersistableBase.GetCommand<LeftRightQuery>(dc, template, where);
- cmd.CommandTimeout = ConfigurationValues.GetInstance().DefaultTimeOut;
- var parser = LinqSQLParser.Create(cmd.CommandText, paging, LinqSQLParser.ObjectTypeConstants.Table);
- cmd.CommandText = parser.GetSQL(optimizer);
- dc.Connection.Open();
- var startTime = DateTime.Now;
- var result = dc.Translate<LeftRightQuery>(cmd.ExecuteReader());
- var endTime = DateTime.Now;
- optimizer.TotalMilliseconds = (long)endTime.Subtract(startTime).TotalMilliseconds;
- var retval = subDomain.GetCollection<LeftRightCollection>();
- var pkList = new HashSet<string>();
- foreach (var item in result)
- {
- var pk = item.SinglePrimaryKeyValue();
- if (!pkList.Contains(pk))
- {
- pkList.Add(pk);
- var newItem = retval.NewItem(item.FleftId, item.FrightId);
- LoadDataRow(item, newItem);
- retval.AddItem(newItem);
- }
- }
- retval.wrappedClass.AcceptChanges();
- retval.wrappedClass.EndLoadData();
- dc.Connection.Close();
- paging.RecordCount = GetCount(where);
- return retval;
- }
-
- private static void LoadDataRow(LeftRightQuery item, LeftRight newItem)
- {
- newItem.wrappedClass["fright_id"] = item.FrightId;
- newItem.wrappedClass["fleft_id"] = item.FleftId;
- }
-
- /// <summary>
- /// Get the maximum value of the field for all objects
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- public static int? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, int>> select)
- {
- return GetMax(select, x => true);
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- public static int? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, int>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where)
- {
- return GetMax(select, where, new QueryOptimizer());
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- public static int? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, int>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer)
- {
- return BusinessObjectQuery<LeftRight, LeftRightQuery, int>.GetMax(select, where, optimizer, "LEFT_RIGHT", GetDatabaseFieldName, LinqSQLParser.ObjectTypeConstants.Table);
- }
-
- /// <summary>
- /// Get the maximum value of the field for all objects
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- public static int? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, int?>> select)
- {
- return GetMax(select, x => true);
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- public static int? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, int?>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where)
- {
- return GetMax(select, where, new QueryOptimizer());
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- public static int? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, int?>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer)
- {
- return BusinessObjectQuery<LeftRight, LeftRightQuery, int?>.GetMax(select, where, optimizer, "LEFT_RIGHT", GetDatabaseFieldName, LinqSQLParser.ObjectTypeConstants.Table);
- }
-
- /// <summary>
- /// Get the maximum value of the field for all objects
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- public static Single? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, Single>> select)
- {
- return GetMax(select, x => true);
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- public static Single? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, Single>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where)
- {
- return GetMax(select, where, new QueryOptimizer());
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- public static Single? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, Single>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer)
- {
- return BusinessObjectQuery<LeftRight, LeftRightQuery, Single>.GetMax(select, where, optimizer, "LEFT_RIGHT", GetDatabaseFieldName, LinqSQLParser.ObjectTypeConstants.Table);
- }
-
- /// <summary>
- /// Get the maximum value of the field for all objects
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- public static Single? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, Single?>> select)
- {
- return GetMax(select, x => true);
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- public static Single? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, Single?>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where)
- {
- return GetMax(select, where, new QueryOptimizer());
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- public static Single? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, Single?>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer)
- {
- return BusinessObjectQuery<LeftRight, LeftRightQuery, Single?>.GetMax(select, where, optimizer, "LEFT_RIGHT", GetDatabaseFieldName, LinqSQLParser.ObjectTypeConstants.Table);
- }
-
- /// <summary>
- /// Get the maximum value of the field for all objects
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- public static double? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, double>> select)
- {
- return GetMax(select, x => true);
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- public static double? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, double>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where)
- {
- return GetMax(select, where, new QueryOptimizer());
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- public static double? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, double>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer)
- {
- return BusinessObjectQuery<LeftRight, LeftRightQuery, double>.GetMax(select, where, optimizer, "LEFT_RIGHT", GetDatabaseFieldName, LinqSQLParser.ObjectTypeConstants.Table);
- }
-
- /// <summary>
- /// Get the maximum value of the field for all objects
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- public static double? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, double?>> select)
- {
- return GetMax(select, x => true);
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- public static double? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, double?>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where)
- {
- return GetMax(select, where, new QueryOptimizer());
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- public static double? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, double?>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer)
- {
- return BusinessObjectQuery<LeftRight, LeftRightQuery, double?>.GetMax(select, where, optimizer, "LEFT_RIGHT", GetDatabaseFieldName, LinqSQLParser.ObjectTypeConstants.Table);
- }
-
- /// <summary>
- /// Get the maximum value of the field for all objects
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- public static decimal? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, decimal>> select)
- {
- return GetMax(select, x => true);
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- public static decimal? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, decimal>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where)
- {
- return GetMax(select, where, new QueryOptimizer());
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- public static decimal? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, decimal>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer)
- {
- return BusinessObjectQuery<LeftRight, LeftRightQuery, decimal>.GetMax(select, where, optimizer, "LEFT_RIGHT", GetDatabaseFieldName, LinqSQLParser.ObjectTypeConstants.Table);
- }
-
- /// <summary>
- /// Get the maximum value of the field for all objects
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- public static decimal? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, decimal?>> select)
- {
- return GetMax(select, x => true);
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- public static decimal? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, decimal?>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where)
- {
- return GetMax(select, where, new QueryOptimizer());
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- public static decimal? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, decimal?>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer)
- {
- return BusinessObjectQuery<LeftRight, LeftRightQuery, decimal?>.GetMax(select, where, optimizer, "LEFT_RIGHT", GetDatabaseFieldName, LinqSQLParser.ObjectTypeConstants.Table);
- }
-
- /// <summary>
- /// Get the maximum value of the field for all objects
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- public static string GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, string>> select)
- {
- return GetMax(select, x => true);
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- public static string GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, string>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where)
- {
- return GetMax(select, where, new QueryOptimizer());
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- public static string GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, string>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer)
- {
- return BusinessObjectQuery<LeftRight, LeftRightQuery, string>.GetMax(select, where, optimizer, "LEFT_RIGHT", GetDatabaseFieldName, LinqSQLParser.ObjectTypeConstants.Table);
- }
-
- /// <summary>
- /// Get the maximum value of the field for all objects
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- public static DateTime? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, DateTime>> select)
- {
- return GetMax(select, x => true);
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- public static DateTime? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, DateTime>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where)
- {
- return GetMax(select, where, new QueryOptimizer());
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- public static DateTime? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, DateTime>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer)
- {
- return BusinessObjectQuery<LeftRight, LeftRightQuery, DateTime>.GetMax(select, where, optimizer, "LEFT_RIGHT", GetDatabaseFieldName, LinqSQLParser.ObjectTypeConstants.Table);
- }
-
- /// <summary>
- /// Get the maximum value of the field for all objects
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- public static DateTime? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, DateTime?>> select)
- {
- return GetMax(select, x => true);
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- public static DateTime? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, DateTime?>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where)
- {
- return GetMax(select, where, new QueryOptimizer());
- }
-
- /// <summary>
- /// Get the maximum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- public static DateTime? GetMax(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, DateTime?>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer)
- {
- return BusinessObjectQuery<LeftRight, LeftRightQuery, DateTime?>.GetMax(select, where, optimizer, "LEFT_RIGHT", GetDatabaseFieldName, LinqSQLParser.ObjectTypeConstants.Table);
- }
-
- /// <summary>
- /// Get the minimum value of the field for all objects
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- public static int? GetMin(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, int>> select)
- {
- return GetMin(select, x => true);
- }
-
- /// <summary>
- /// Get the minimum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- public static int? GetMin(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, int>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where)
- {
- return GetMin(select, where, new QueryOptimizer());
- }
-
- /// <summary>
- /// Get the minimum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- public static int? GetMin(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, int>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer)
- {
- return BusinessObjectQuery<LeftRight, LeftRightQuery, int>.GetMin(select, where, optimizer, "LEFT_RIGHT", GetDatabaseFieldName, LinqSQLParser.ObjectTypeConstants.Table);
- }
-
- /// <summary>
- /// Get the minimum value of the field for all objects
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- public static int? GetMin(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, int?>> select)
- {
- return GetMin(select, x => true);
- }
-
- /// <summary>
- /// Get the minimum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- public static int? GetMin(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, int?>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where)
- {
- return GetMin(select, where, new QueryOptimizer());
- }
-
- /// <summary>
- /// Get the minimum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- public static int? GetMin(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, int?>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer)
- {
- return BusinessObjectQuery<LeftRight, LeftRightQuery, int?>.GetMin(select, where, optimizer, "LEFT_RIGHT", GetDatabaseFieldName, LinqSQLParser.ObjectTypeConstants.Table);
- }
-
- /// <summary>
- /// Get the minimum value of the field for all objects
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- public static Single? GetMin(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, Single>> select)
- {
- return GetMin(select, x => true);
- }
-
- /// <summary>
- /// Get the minimum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- public static Single? GetMin(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, Single>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where)
- {
- return GetMin(select, where, new QueryOptimizer());
- }
-
- /// <summary>
- /// Get the minimum value of the field in the set of records that match the Where condition
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- /// <param name="where">The expression that determines the records selected</param>
- /// <param name="optimizer">An object to specify querying parameters and return profiling information</param>
- public static Single? GetMin(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, Single>> select, Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, bool>> where, Widgetsphere.Core.DataAccess.QueryOptimizer optimizer)
- {
- return BusinessObjectQuery<LeftRight, LeftRightQuery, Single>.GetMin(select, where, optimizer, "LEFT_RIGHT", GetDatabaseFieldName, LinqSQLParser.ObjectTypeConstants.Table);
- }
-
- /// <summary>
- /// Get the minimum value of the field for all objects
- /// </summary>
- /// <param name="select">The field to aggregate</param>
- public static Single? GetMin(Expression<Func<Acme.TestModel.Business.LINQ.LeftRightQuery, Single?>> select)
- {
- return GetMin(select, x => true);
- }
-
- /// <summary>
- /// Get the minimum value of the field in the set of records that match the Whe…
Large files files are truncated, but you can click here to view the full file