Click here to Skip to main content
15,895,538 members
Articles / General Programming / Architecture

Binding Web Pages with nHydrate

,
Rate me:
Please Sign up or sign in to vote.
4.71/5 (5 votes)
1 Jun 2011Ms-PL12 min read 20.9K   256   14  
Bind your UI controls to generated objects generically
using System;
using System.Linq;
using System.Runtime.Serialization;
using System.Data.Objects.DataClasses;
using System.Xml.Serialization;
using System.ComponentModel;
using System.Collections.Generic;
using System.Text;
using Acme.EFExample.EFDAL.Interfaces;

namespace Acme.EFExample.EFDAL.Interfaces.Entity
{
	/// <summary>
	/// This is the base interface for the EF entity for Country
	/// </summary>
	public partial interface ICountry : Widgetsphere.EFCore.DataAccess.IBusinessObject
	{
		#region Properties

		/// <summary>
		/// The property that maps back to the database 'Country.CountryId' field
		/// </summary>
		int CountryId { get; }

		/// <summary>
		/// The property that maps back to the database 'Country.Name' field
		/// </summary>
		string Name { get; set; }

		/// <summary>
		/// The audit field for the 'Created By' column.
		/// </summary>
		string CreatedBy { get; }

		/// <summary>
		/// The audit field for the 'Created Date' column.
		/// </summary>
		DateTime? CreatedDate { get; }

		/// <summary>
		/// The audit field for the 'Modified By' column.
		/// </summary>
		string ModifiedBy { get; }

		/// <summary>
		/// The audit field for the 'Modified Date' column.
		/// </summary>
		DateTime? ModifiedDate { get; }

		#endregion

		#region Navigation Properties

		/// <summary>
		/// The back navigation definition for walking Country->SystemUser
		/// </summary>
		[XmlIgnoreAttribute()]
		[SoapIgnoreAttribute()]
		[DataMemberAttribute()]
		[EdmRelationshipNavigationPropertyAttribute("Acme.EFExample.EFDAL.Interfaces.Entity", "FK__SystemUser_Country", "SystemUserList")]
		ICollection<Acme.EFExample.EFDAL.Interfaces.Entity.ISystemUser> SystemUserList { get; }

		#endregion

	}

}

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.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)



Written By
Software Developer (Senior) Hewlett Packard
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions