【发布时间】:2013-10-12 23:18:11
【问题描述】:
我对微风很陌生。我已经下载了 AngularBreeze 的模板并尝试创建一个示例应用程序,但我被困在 Breeze WebApi 控制器上。
BreezeController]
public class ProductsBreezeController : ApiController
{
private readonly ProductRepository context;
public ProductsBreezeController()
{
context = new ProductRepository();
}
[HttpGet]
public string Metadata()
{
return context.Metadata();
}
//// GET api/productsbreeze
public IQueryable<Product> GetAllProducts()
{
return context.TodoLists;
}
}
public class ProductRepository : EFContextProvider<SampleEntities>
{
public DbQuery<Product> TodoLists
{
get { return Context.Products; }
}
}
异常消息
找到与请求匹配的多个操作:AngularWebApi.ApiControllers.ProductsBreezeController System.Linq.IQueryable`1[AngularWebApi.DataAccess.Model.Product] AngularWebApi.ApiControllers 类型上的 System.String Metadata()。产品BreezeController
ExceptionType:“System.InvalidOperationException”
【问题讨论】:
标签: asp.net-mvc angularjs asp.net-web-api breeze