I am trying to use stored procedure in dbml, but I get below error. The Stored procedure has multiple join tables, but it returns a row.
public static List<SP_EMP_MASTER_DETAILResult> GetEmployeeDetail(string userName, string userLocation)
{
var query = (from q in db.SP_EMP_MASTER_DETAIL(userLocation, userName)
select new SP_EMP_MASTER_DETAILResult { ID = q.EMP_ID, Name = q.EMP_NM }).ToList();
return query;
}
This is an error.
An object reference is required for the non-static field, method, or property 'Tiger.Models.HomeRepository.db'