IDALService.cs
[OperationContract]
bool functionname(int mID, string mName);
DALService.svc.cs
public bool functionname(int mID, string mName)
{
return mobjDal.functionname(mID, mName);
}
DAL File(Class.cs)
public bool functionname(int mID, string mName)
{
try
{
tblTable objTable = new tblTable(); // objTable is object of table in which you want to add record
objTable.ID = mID;
objTable.Name = mName;
mobjEntity.tblTable.AddObject(objTable); // mobjEntity is the object of Entity
mobjEntity.SaveChanges();
return true;
}
catch(Exception mEx)
{
return false;
}
}
Please go through following url for implement Transaction on OperationContract
6 Steps to Enable Transactions in WCF[
^]
Hope this post will help you..
Regards,
Jitendra Kumar