private PTMEntities db = new PTMEntities(); public IEnumerable<GetAllCompanies_Result> GetAllCompanies() { using (var db = new PTMEntities()) { return db.GetAllCompanies(); } } Model1.context.cs code here public virtual ObjectResult<GetAllCompanies_Result> GetAllCompanies() { return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetAllCompanies_Result>("GetAllCompanies"); }
return db.GetAllCompanies().AsEnumerable<getallcompanies_result>();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)