// Constructors public TopEntity(SubEntity subEntity) { #region Contracts if (subEntity == null) throw new ArgumentNullException(); #endregion // Arguments this.SubEntity = subEntity; }
// Methods protected override object CreateEntity() { // Parameters string parameterA = this.ParameterA; if (string.IsNullOrEmpty(parameterA) == true) throw new InvalidOperationException(); // Create SubEntity subEntity = new SubEntity(parameterA); // Return return subEntity; }