comparison Demo/WinForms/ObjectModel/Person.cs @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f990fcb411a9
1 using System;
2
3 using BLToolkit.Mapping;
4 using BLToolkit.Validation;
5
6 namespace BLToolkit.Demo.ObjectModel
7 {
8 [MapField("PersonID", "ID")]
9 public abstract class Person : BizEntity
10 {
11 [MaxLength(50), Required] public abstract string LastName { get; set; }
12 [MaxLength(50), Required] public abstract string FirstName { get; set; }
13 [MaxLength(50)] public abstract string MiddleName { get; set; }
14 public abstract Gender Gender { get; set; }
15
16 [MapIgnore]
17 public string FullName
18 {
19 get
20 {
21 return string.Format(
22 string.IsNullOrEmpty(MiddleName)? "{2}, {0}": "{2}, {0} {1}.",
23 FirstName, MiddleName, LastName);
24 }
25 }
26 }
27 }