That is what I thought but here is my problem:
As stated before I am using the adapter method. I have also written a class that looks like this:
public class ExpenseReportEntity:DAL.EntityClasses.ExpenseReportEntity
{
private DAL.DatabaseSpecific.DataAccessAdapter mAdapter = new ExpenseReimbursment.DAL.DatabaseSpecific.DataAccessAdapter();
public ExpenseReportEntity():base(){}
public ExpenseReportEntity(int Expensereportid):base(Expensereportid){}
public bool Save()
{
return mAdapter.SaveEntity(this);
}
public bool Delete()
{
return mAdapter.DeleteEntity(this);
}
}
So in my PL Code I this is what I do
BLL.EntityClasses.ExpenseReportEntity exr = new ExpenseReimbursment.BLL.EntityClasses.ExpenseReportEntity();
exr.EmployeeId = SessionManager.Instance.Employee.EmployeeId;
exr.SupervisorId = SessionManager.Instance.Employee.SupervisorId;
exr.Costcenterid = int.Parse(ddlCostCenters.SelectedValue);
exr.Approvalstatusid = "n";
exr.Description = txtDescription.Text;
exr.Save();
lblResults.Text = exr.Expensereportid.ToString();
lblResult is 0. Baically after calling the save method my object is not getting updated. I know that is is not an LLBLGen probem but rather a desigen problem on my part. Hoping you could help.