Ejemplo n.º 1
0
        public void Apply(FluentNHibernate.Conventions.Instances.IClassInstance instance)
        {
            string typeName = instance.EntityType.Name;

            IPluralize pluralizer = new Pluralizer();

            instance.Table(pluralizer.Pluralize(typeName));
        }
Ejemplo n.º 2
0
        public void Apply(FluentNHibernate.Conventions.Instances.IClassInstance instance)
        {
            //instance.Table(Inflector.Net.Inflector.Pluralize(instance.EntityType.Name));
            //instance.Table("PRF_" + instance.EntityType.Name);

            // e.g. Profiling2.Domain.Scr.Proposed.RequestProposedPerson
            string[] namespaces = instance.EntityType.Namespace.Split('.');

            if (namespaces != null && namespaces.Length > 2)
            {
                // produces 'Scr_RequestProposedPerson'.
                instance.Table(namespaces[2] + "_" + instance.EntityType.Name);
            }
            else
            {
                instance.Table(instance.EntityType.Name);
            }
        }
Ejemplo n.º 3
0
        public void Apply(FluentNHibernate.Conventions.Instances.IClassInstance instance)
        {
            //if (instance.EntityType.Name.ToUpper().Contains("WORKER"))
            //    instance.Table("WORKERS");
            //else
            var a = instance.EntityType.Name;

            instance.Table(Inflector.Net.Inflector.Pluralize(instance.EntityType.Name));
        }
Ejemplo n.º 4
0
        public void Apply(FluentNHibernate.Conventions.Instances.IClassInstance instance)
        {
            instance.Table(Inflector.Net.Inflector.Pluralize(instance.EntityType.Name));

            if (!typeof(Closet).IsAssignableFrom(instance.EntityType))
            {
                instance.Cache.Region("Entities");
                instance.Cache.NonStrictReadWrite();
            }
        }
Ejemplo n.º 5
0
 public void Apply(FluentNHibernate.Conventions.Instances.IClassInstance instance)
 {
     instance.Table(Inflector.Net.Inflector.Pluralize(instance.EntityType.Name));
 }
Ejemplo n.º 6
0
 public void Apply(FluentNHibernate.Conventions.Instances.IClassInstance instance)
 {
     instance.Table(instance.EntityType.Name.InflectTo().Pluralized);
 }
Ejemplo n.º 7
0
 public void Apply(FluentNHibernate.Conventions.Instances.IClassInstance instance)
 {
     // Make the table the plural version of the entity's name
     instance.Table(Inflector.Pluralize(instance.EntityType.Name));
 }
Ejemplo n.º 8
0
 public void Apply(FluentNHibernate.Conventions.Instances.IClassInstance instance)
 {
     instance.Table(MvcApplication.Config("table.Prefix") + instance.EntityType.Name);
 }
Ejemplo n.º 9
0
            public void Apply(FluentNHibernate.Conventions.Instances.IClassInstance instance)
            {
                string typeName = instance.EntityType.Name;

                instance.Table(typeName + "s");
            }
 public void Apply(FluentNHibernate.Conventions.Instances.IClassInstance instance)
 {
     instance.Table(instance.EntityType.Name);
 }