-
Notifications
You must be signed in to change notification settings - Fork 59
Home
陈珙 edited this page Mar 25, 2019
·
5 revisions
using (var con = new SqlConnection("Data Source=192.168.13.46;Initial Catalog=SkyChen;Persist Security Info=True;User ID=sa;Password=123456789"))
{
con.CommandSet<SysUser>().Insert(new SysUser
{
CreateDatetime = DateTime.Now,
Email = "[email protected]",
SysUserid = Guid.NewGuid().ToString("N"),
UserName = "chengong",
});
var model = con.QuerySet<SysUser>().Where(a => a.Email == "[email protected]").Get();
con.CommandSet<SysUser>().Where(a => a.SysUserid == model.SysUserid)
.Update(a => new SysUser { Email = "[email protected]" });
con.CommandSet<SysUser>().Where(a => a.SysUserid == model.SysUserid).Delete();
}