userdetail ud = new userdetail();
ud.username = "a";
ud.password = "a";
ud.createddate = DateTime.Now;
ud.createdtime = DateTime.Now;
dbcontext.userdetails.Add(ud);
dbcontext.SaveChanges();
record rd = new record();
rd.createddt = DateTime.Now;
rd.uid = ud.uid;
dbcontext.records.Add(rd);
dbcontext.SaveChanges();
No comments:
Post a Comment