Run Code  | Code Wall  | Users  | Misc  | Feedback  | About  | Login  | Theme  | Privacy 

Why Linqdb is cool if you are a Csharper

      
            
                
            
 run  | edit  | history  | help 0

Because you can build real shit with it entirely in C#.

It's all type-safe for starters. It utilizes some advanced C# features, for example, you can do this:

public List<IDataTable> SelectMyData<T>(Db db) where T : IDataTable, new()
{
    return db.Table<T>()
             .Select(f => new { .... })
             .Select(f => new DataTable { ... })
             .ToList<IDataTable>();
}

...

var r1 = SelectMyData<DataTable1>(db);
var r2 = SelectMyData<DataTable2>(db);

Generic parameters (tables) work on all .Table() operations.

Another thing is that Db object is lightweight and thread-safe. You create it once and toss it like you like. You could easily distribute data to say 10 servers and have methods that take Db as a parameter. Then another method that will produce correct Db for given server based on some criteria.

Further, Linqdb schema is dynamic in a sense that it is completely defined by C# classes, you can have your classes-tables in a separate project shared everywhere. Deployments are easy.

Last, but not least, Linqdb is fast since it is based on Leveldb.

Check it out here and let me know what do you think? Perhaps I should make it open-souce?

  by  renz, 6 months ago




Please log in to post a comment.