, , DDD, . - " ".
, Specification, , Domain-Driven Design, , , , - .
, DDD - , "" . Entities. OOD, , , .
, Entities , , , .
, , , Entity:
public class MyEntity
{
private string name;
public MyEntity(string name)
{
if(string.IsNullOrEmpty(name))
{
throw new ArgumentException();
}
this.name = name;
}
public string Name
{
get { return this.name; }
set
{
if(string.IsNullOrEmpty(value))
{
throw new ArgumentException();
}
this.name = value;
}
}
}
, null, : MyEntity , .
, , .