-

   rss_habrahabr

 - e-mail

 

 -

 LiveInternet.ru:
: 22.11.2006
:
:
: 2

:


Linq to Sql

, 19 2015 . 12:08 +

. - Entity Framework ( , , EF 7), , . , , , , - , Microsoft .

DbType


DbType ( enum', ) Linq 2 Sql. DbType. , , nvarchar(50), Linq 2 Sql, nchar(50). , , :

	[Table(Name = "directcrm.OperationSteps")]
	[InheritanceMapping(Code = "", Type = typeof(OperationStep), IsDefault = true)]
	// ...
	[InheritanceMapping(Code = "ApplySegment", Type = typeof(ApplySegmentOperationStep))]
	public class OperationStep : INotifyPropertyChanging, INotifyPropertyChanged, IValidatable
	{

		//   
		...

		[Column(Storage = "type", DbType = "nchar(50) NOT NULL", CanBeNull = false, IsDiscriminator = true)]
		public string Type
		{
			get
			{
				return type;
			}
			set
			{
				if ((type != value))
				{
					SendPropertyChanging();
					type = value;
					SendPropertyChanged();
				}
			}
		}
	}

http://habrahabr.ru/post/250759/

:  

: [1] []
 

:
: 

: ( )

:

  URL