Files
mono/mcs/class/System.Web.DynamicData/Test/ModelProviders/DynamicDataAssociationProvider.cs
T
Marek Habersack 5776009840 2009-06-12 Marek Habersack <[email protected]>
* MetaTableTest.cs: tests use single data model provider now.
	Implemented tests for IsReadOnly, ListActionPath, Model, Name,
	Provider, Scaffold, SortColumn, SortDescending, ToString.
	Fixed ForeignKeyColumnNames test.

2009-06-12  Marek Habersack  <[email protected]>

	* TestDataContainer.cs: GetTables uses an object of the associated
	data type to create table collection.

	* TestDataColumn.cs: foreign key columns are determined using a
	custom attribute instead of a name now. This makes it possible to
	specify which table.column they are associated with.

	* FooDisplayColumnAttribute.cs: changed sortDescending to true in
	class attributes.

	* AssociatedBar.cs, AssociatedFoo.cs, FooEmptySortColumn.cs,
	FooMisnamedSortColumn.cs, FooNoScaffold.cs, FooReadOnly.cs,
	ITestDataContext.cs, TestDataContext.cs: added

2009-06-12  Marek Habersack  <[email protected]>

	* MetaTable.cs: implemented correct detection of foreign key
	columns.
	Implemented IsReadOnly, SortColumn, SortDescending.

svn path=/trunk/mcs/; revision=135997
2009-06-12 13:14:49 +00:00

23 lines
561 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.DynamicData;
using System.Web.DynamicData.ModelProviders;
using MonoTests.DataSource;
namespace MonoTests.ModelProviders
{
class DynamicDataAssociationProvider : AssociationProvider
{
public DynamicDataAssociationProvider (AssociationDirection direction, ColumnProvider owner, ColumnProvider to)
{
this.Direction = direction;
this.IsPrimaryKeyInThisTable = owner.IsPrimaryKey;
this.FromColumn = owner;
this.ToTable = to.Table;
}
}
}