using
EMLib.Entity;
EMLib.EqlLib;
EMLib.Global;
EMLib.Orm;
MyNamespace;
EqlSelect stmt = Eql.Select(MyContext.Company).
From(MyContext.Company).
Where(MyContext.Company.ID > 10);
EqlUpdate stmt = Eql.Update(MyContext.Company).
Set(MyContext.Company.CompanyName,
"MyCompany"
).
ThenSetNull(MyContext.Company.Address).
Where(SqlLib.Len(MyContext.Company.Address) < 5);
EqlInsert stmt = Eql.InsertInto(MyContext.Company).
ThenSetNull(MyContext.Company.Address);
EqlDelete stmt = Eql.Delete(MyContext.Company).
EMContext context = MyContext.CreateContext(pathModel, pathLic);
Where(MyContext.Company.ID > 5);
EMStmeHelper helper =
new
EMStmeHelper(context);
EMStmtUnit txtSql = helper.EqlBuildSqlText(stmt);
SELECT
Company.ID, Company.Address, Company.CompanyName,
'Company'
AS
CurrEntityTag
FROM
Company
WHERE
Company.ID > @ParamName1
UPDATE
SET
Company.CompanyName = @ParamName1,
Company.Address =
NULL
Len(Company.Address) < @ParamName2
INSERT
INTO
(Company.CompanyName, Company.Address)
VALUES
(@ParamName1,
)
DELETE
Len(Company.Address) < @ParamName1
EqlSelect stmt = Eql.Select(MyContext.BaseEntityPoly).
From(MyContext.BaseEntityPoly).
Where(MyContext.BaseEntityPoly.ID > 10);
BaseEntity.ID, BaseEntity.BaseName, BaseEntity.CurrEntityTag
(
BaseEntity.ID, BaseEntity.BaseName,
'BaseEntity'
BaseEntity
UNION
ALL
SubEntity.ID, SubEntity.BaseName,
'SubEntity'
SubEntity)
BaseEntity.ID > @ParamName1
EqlDelete stmt = Eql.Delete(MyContext.BaseEntityPoly).
PolySubject
BaseEntity, BaseEntity
AND
BaseEntity.CurrEntityTag =
PolySubject.ID = BaseEntity.ID
BaseEntity, SubEntity
Where(MyContext.Company.ID.In(Eql.Select(MyContext.Employee).
From(MyContext.Employee).
Where(MyContext.Employee.ID < 10)));
EqlSelect stmtSub = Eql.Select(MyContext.Employee).
Where(MyContext.Employee.ID < 10);
Where(MyContext.Company.ID.In(stmtSub));