Entity Framework Error: Cannot implicitly convert type DAL.OtherIncome to AccountSystem.OtherIncome in ASP.Net

Last Reply 10 months ago By Vadivxaya

Posted 10 months ago

I am Getting a error 

Cannot implicitly convert type 'DAL.OtherIncome' to 'AccountSystem.OtherIncome'

Can You Please help me to fix this


public OtherIncome getByID(int id)
    OtherIncome OtherInc = ent.OtherIncomes.Where(o => o.ID==id).Single();
    return OtherInc;

int OtherID = int.Parse(ViewState["ID"].ToString());
IncomeDAL Inc = new IncomeDAL();
OtherIncome othIn = Inc.getByID(OtherID);
You are viewing reply posted by: Vadivxaya 10 months ago.
Posted 10 months ago

Dear Dharmendr,


Thanks for your reply, i found the reason for error happen.

Because i am using the same name in database table and page name, now i change the table name its working. thank you for your replay once again.



I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html