LambdaToSql.SqlClient DB = new LambdaToSql.SqlClient();
刪除單個實體,經過Guid主鍵刪除 html
var guid = Guid.Parse("5ed14b29-bf79-4a59-8ec4-9440f245dc10"); var entity = DB.QueryTable<EntityModel.System_UserInfo>(ex => ex.Guid == guid).FirstOrDefault(); var i = DB.DeleteTble<EntityModel.System_UserInfo>(entity).ExecuteNonQuery(); var i = DB.DeleteTble<EntityModel.System_UserInfo>(ex => ex.Guid == Guid.Parse("9c1d1247-cd2c-424d-be14-ef8abae655a4")).ExecuteNonQuery();
條件刪除ui
var i = DB.DeleteTble<EntityModel.System_UserInfo>(ex => ex.PassWord == "1").ExecuteNonQuery(); var item = new string[] { "15842709668", "18609877687", "15804279711", "13998756128", "13019965033" }.ToList(); var i1 = DB.DeleteTble<EntityModel.System_UserInfo>(ex => item.NotContains(ex.LoginName)).ExecuteNonQuery();