Пример #1
0
        public override void Up()
        {
            var builder = new SchemaBuilder(Schema);

            builder.AddTable("Usuario",
                    Columns.PrimaryKey<int>("Id"),
                    Columns.Simple<string>("Nome", 100),
                    Columns.Simple<string>("Login", 20),
                    Columns.Simple<string>("Senha", 50),
                    Columns.Simple<int>("IsAtivo"),
                    Columns.Simple<int>("Perfil")
                );
        }
Пример #2
0
        public override void Up()
        {
            var builder = new SchemaBuilder(Schema);

            builder.AddTable("Cliente",
                    Columns.PrimaryKey<int>("Id"),
                    Columns.Simple<string>("NomeContato", 100),
                    Columns.Simple<string>("NomeFantasia", 100).Nullable(),
                    Columns.Simple<string>("RazaoSocial", 100).Nullable(),
                    Columns.Simple<string>("CNPJ", 50).Nullable(),
                    Columns.Simple<string>("Endereco", 200).Nullable(),
                    Columns.Simple<string>("Telefone", 20).Nullable(),
                    Columns.Simple<string>("Celular", 20).Nullable(),
                    Columns.Simple<string>("Email", 100).Nullable(),
                    Columns.Simple<string>("Observacao", 500).Nullable(),
                    Columns.Simple<int>("IsAtivo")
                );
        }
Пример #3
0
 public void Can_AddTable()
 {
     _schemaBuilder.AddTable("MyUserTable");
     //Assert.AreEqual("MyUserTable", _schemaBuilder.Expressions.ElementAt(0));
 }
Пример #4
0
 public void Setup()
 {
     _schemaBuilder = new SchemaBuilder();
     _schemaBuilder.AddTable("SomeTable");
 }