using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Web.DynamicData; using System.Web.DynamicData.ModelProviders; using System.Web.UI; using System.Web.UI.WebControls; using MonoTests.System.Web.DynamicData; using MonoTests.ModelProviders; using MonoTests.DataSource; namespace MonoTests.Common { public class TestDataContext3 : ITestDataContext { List associatedFoo; List associatedBar; List bazWithDataTypeAttribute; public List AssociatedFoo { get { if (associatedFoo == null) associatedFoo = new List (); return associatedFoo; } } public List AssociatedBar { get { if (associatedBar == null) associatedBar = new List (); return associatedBar; } } public List BazWithDataTypeAttribute { get { if (bazWithDataTypeAttribute == null) bazWithDataTypeAttribute = new List (); return bazWithDataTypeAttribute; } } #region ITestDataContext Members public IList GetTableData (string tableName, DataSourceSelectArguments args, string where, ParameterCollection whereParams) { if (String.Compare (tableName, "AssociatedFooTable", StringComparison.OrdinalIgnoreCase) == 0) return AssociatedFoo; if (String.Compare (tableName, "AssociatedBarTable", StringComparison.OrdinalIgnoreCase) == 0) return AssociatedBar; if (String.Compare (tableName, "BazWithDataTypeAttributeTable", StringComparison.OrdinalIgnoreCase) == 0) return BazWithDataTypeAttribute; return null; } public List GetTables () { return new List { new TestDataTable(), new TestDataTable(), new TestDataTable () }; } #endregion } }