Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        public SqlDbMigrationsConfiguration()
        {
            string DocTypeName, DocRev;

            if (RuntimeTypeNamer.TryParseDocNameAndRev(typeof(TContext).Namespace, out DocTypeName, out DocRev))
            {
                ContextKey = DocTypeName;
            }

            AutomaticMigrationsEnabled        = true;
            AutomaticMigrationDataLossAllowed = true;
        }
Ejemplo n.º 3
0
        /// <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);
            }
        }