public static BusinessEntity From(EntityTestId testId, Version version) { var bobj = new BusinessEntity(testId, version); var validator = new BusinessEntityValidator(); bobj.SetValidationResult(validator.Validate(bobj)); return(bobj); }
public static EntityTestId From(Guid id) { var entityId = new EntityTestId(id); var validator = new EntityIdTestValidator(); entityId.SetValidationResult(validator.Validate(entityId)); return(entityId); }
public int CompareTo(EntityTestId other) { if (ReferenceEquals(this, other)) { return(0); } if (ReferenceEquals(null, other)) { return(1); } return(Value.CompareTo(other.Value)); }
private BusinessEntity(EntityTestId businessTestId, Version version) { BusinessTestId = businessTestId; Version = version; }
public static BusinessEntity New() { return(From(EntityTestId.GetNext(), Version.New())); }
public static EntityTestId Empty() { return(EntityTestId.From(Guid.Empty)); }