public string Write <T>(T source, bool includeProcessingInformation = true) where T : DocProcessingInstructions { string DocTypeName, DocRev; if (!RuntimeTypeNamer.TryParseDocNameAndRev(source.GetType().Namespace, out DocTypeName, out DocRev)) { throw new Exception("Can't determine DocTypeName/DocRev"); } return(InstanceLocatorByName(DocTypeName, DocRev).Write(source, includeProcessingInformation)); }
public SqlDbMigrationsConfiguration() { string DocTypeName, DocRev; if (RuntimeTypeNamer.TryParseDocNameAndRev(typeof(TContext).Namespace, out DocTypeName, out DocRev)) { ContextKey = DocTypeName; } AutomaticMigrationsEnabled = true; AutomaticMigrationDataLossAllowed = true; }
/// <inheritdoc /> public override void Apply(ConventionTypeConfiguration configuration, TableAttribute attribute) { string docTypeName, docRev; if (RuntimeTypeNamer.TryParseDocNameAndRev(configuration.ClrType.Namespace, out docTypeName, out docRev)) { configuration.ToTable(attribute.Name, docTypeName); } else { configuration.ToTable(attribute.Name, SqlDB.InitializingDocTypeName); } }