Cobweb.Data.FluentMigrator 3.0.0

Suggested Alternatives

Aranasoft.Cobweb.FluentMigrator.Extensions 3.1.0

Additional Details

Cobweb.Data.FluentMigrator has been replaced with Aranasoft.Cobweb.FluentMigrator.Extensions. Cobweb.Data.FluentMigrator will no longer be maintained as all future development will be released to Aranasoft.Cobweb.FluentMigrator.Extensions.

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.

Requires NuGet 3.5 or higher.

dotnet add package Cobweb.Data.FluentMigrator --version 3.0.0
NuGet\Install-Package Cobweb.Data.FluentMigrator -Version 3.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cobweb.Data.FluentMigrator" Version="3.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Cobweb.Data.FluentMigrator --version 3.0.0
#r "nuget: Cobweb.Data.FluentMigrator, 3.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Cobweb.Data.FluentMigrator as a Cake Addin
#addin nuget:?package=Cobweb.Data.FluentMigrator&version=3.0.0

// Install Cobweb.Data.FluentMigrator as a Cake Tool
#tool nuget:?package=Cobweb.Data.FluentMigrator&version=3.0.0

Cobweb.Data.FluentMigrator Visual Studio Team Services

FluentMigrator utilities and classes for Cobweb, a utility library for .NET.

Cobweb was created by Arana Software, a software agency in Las Vegas, Nevada.

Alternate Syntax for FluentMigrator

Cobweb.Data.FluentMigrator provides an alternate syntax style for FluentMigrator, a database migration framework for .NET, using lambda expression syntax instead of method chains.

FluentMigrator's Method Chain Syntax

FluentMigrator employes a series of chained expression to build database schema.

Create.Table("TestTable")
      .WithColumn("FirstColumn").AsString().Nullable().WithDefaultValue("test")
      .WithColumn("SecondColumn").AsString().NotNullable().WithDefaultValue("sample");

Though this style is effective, some may find the syntax confusing, as there is no clear delineation between setting column properties and transitioning additional columns. Because this grouping can only be resolved through the context of method names, it is also impossible for code-formatting tools to organize and group applicable code.

Cobweb's Lambda Expression Syntax

Cobweb uses lambda expressions to define column properties.

Create.Table("TestTable")
      .WithColumn("FirstColumn", col => col.AsString().Nullable().WithDefaultValue("test"))
      .WithColumn("SecondColumn, col => col.AsString().NotNullable().WithDefaultValue("sample"));

Under the covers, Cobweb passes these lambda expressions to FluentMigrator's method chains. The lambda syntax will naturally group column properties and delineate from other columns. This grouping also enables code formating support from editor tooling.

Installation

From Package Manager Console:

PM> install-package cobweb.data.fluentmigrator

From .NET CLI:

> dotnet add package Cobweb.Data.FluentMigrator

Usage

Create Table: WithColumn

Syntax: WithColumn(string columnName, Func columnOptions)

Create.Table("TestTable")
      .WithColumn("FirstColumn", col => col.AsString().Nullable())
      .WithColumn("SecondColumn, col => col.AsString().NotNullable().WithDefaultValue("sample"));

Alter Table: AddColumn

Syntax: AddColumn(string columnName, Func columnOptions)

Alter.Table("TestTable")
     .AddColumn("FirstColumn", col => col.AsInt32().Nullable())
     .AddColumn("SecondColumn", col => col.AsInt32().NotNullable().WithDefaultValue(5)));

Alter Table: AlterColumn

Syntax: AlterColumn(string columnName, Func columnOptions)

Alter.Table("TestTable")
     .AlterColumn("FirstExistingColumn", col => col.AsInt32())
     .AlterColumn("SecondExistingColumn", col => col.AsInt32().NotNullable().WithDefaultValue(5)));

Create Index: OnColumn

Syntax: OnColumn(string columnName, Func columnOptions)

Create.Index("TestIndex")
     .OnColumn("FirstColumn", col => col.Ascending())
     .OnColumn("SecondColumn", col => col.Descending());

License

Cobweb is copyright of Arana Software, released under the BSD License.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated