Skip to content

Combine EF & SQL in the same library and same commitment. So that it has EF advantage of easy to use and SQL advantage of complete CRUD function.

Notifications You must be signed in to change notification settings

microzaki/HybridEntityFramework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

Purpose

Most of EF architectures such as EF Code are designed for specific DB type and less functions than SQL.

This DLL combines EF and SQL together, you can choose either one to use. And finally commit all of them in one commitment.

Environment

So far it only supports SQLite. But it's quite easy to support other RDBMS by replacement of DB inteface DLL.

Example Code

Insert two rows. Fist one uses EF and second one uses SQL. Finally commit both on them.

List<SqlScript> sqls = new List<SqlScript>();
#region Entity Framework
FEEDER feeder = new FEEDER() { GRIPPERNO = 1,SCARATRAYNO=2 ,FEEDERNO=3};
sqls.AddRange(db.Create<FEEDER>(eInsertUpdateType.Normal,feeder));
#endregion
#region SQL Script
sqls.Add( new SqlScript("INSERT INTO FEEDER(GRIPPERNO,SCARATRAYNO,FEEDERNO) VALUES(4,5,6)"));
#endregion
db.commit(sqls);

About

Combine EF & SQL in the same library and same commitment. So that it has EF advantage of easy to use and SQL advantage of complete CRUD function.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages