Createad webservice显示对象数据库列表

时间:2017-06-13 22:23:30

标签: web-services listobject

我需要创建一个" webservice"通过"实体框架数据库显示对象列表" 给错误: EmployeeMenu,App_Code.z3zqdvha,Version = 0.0.0.0,Culture = neutral,PublicKeyToken = Null,因为它是一个接口。

代码:

   public List<Meal> meals()
    {
       var md = (from c in db.Meal select new Meal { MealId=c.MealId,Name=c.Name }).ToList<Meal>();
        return md;
    }
 public List<Meal> getmeals()
    {
        CMSController cms = new CMSController();
        return cms.meals();
    }

0 个答案:

没有答案