我对微风很陌生。我已经下载了 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.String Metadata() System.Linq.IQueryable`1[AngularWebApi.DataAccess.Model.Product] GetAllProducts() 类型 AngularWebApi.ApiControllers.ProductsBreezeController
异常类型:“System.InvalidOperationException”