I have noticed that there's been a few attempt to implement fluent api for sqlite-net in the past. The prominent one being from @RoyGoode.
This is my attempt to implement fluent API that is based on @RoyGoode's code. I also took to consideration the author's (@praeclarum) comment in #533. This should get rid of the requirement to use the attribute for table and columns.
Usage
var mapping = TableMapping.Builder<SomeTable>()
.TableName("some_table")
.ColumnName(s => s.Name, "some_name")
.AutoIncrement(s => s.MyId)
.PrimaryKey(s => s.MyId)
.Unique(s => s.MyId)
.Build();
connection.UseMapping(mapping);
connection.CreateTable<SomeTable>();
// or
connection.CreateTable<SomeTable>(mapping);
// this also supports CreateTables(map1, map2, map3, ... );
I have noticed that there's been a few attempt to implement fluent api for sqlite-net in the past. The prominent one being from @RoyGoode.
This is my attempt to implement fluent API that is based on @RoyGoode's code. I also took to consideration the author's (@praeclarum) comment in #533. This should get rid of the requirement to use the attribute for table and columns.
Usage
I'm open to any comments and suggestions.