问题描述
我有2 TableController 2我的表。此外,我需要另一个控制器,它从表中数据处理。
I have 2 TableController for 2 my tables. Also I need another controller, which process data from tables.
Azure中的文档说我应该声明ApiController方式如下:
Azure's documentation says I should declare ApiController following way:
[MobileAppController]
public class CustomController : ApiController
{
//...
}
但我不知道如何从表中得到任何数据来处理它。
我试图创建表的控制器的新实例,但它不工作,这样的方式。任何解决方案?
But I don't realize how to get any data from tables to process it.I tried to create new instance of Table's Controller, but it doesn't work such way. Any solutions?
推荐答案
要自定义API中管理表,只要使用正规的实体框架code。你可以在这里找到一个教程:
To manage the tables within your custom API, just use regular entity framework code. You can find a tutorial here: http://www.entityframeworktutorial.net/entityframework6/introduction.aspx
这篇关于如何实现天青MobileAppController C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!