Kamis, 24 Januari 2008

LinQ Insert, Update

First to Insert just
Create New object of your mapping
ex: class MyuserList
string username;
int age;

MyuserList a=new MyuserList();
a.username="cipto";
a.age="26";

or Dynamicinsert(a);

Mydatacontext tmp=new Mydatacontext();
tmp.insertonsubmit(a);

For Update
-------------------
just get the recod and change the properti and then
submitchanges();=>everything is update to DB

Tidak ada komentar: