如何实现天青MobileAppController C# [英] How to implement Azure MobileAppController C#

查看:154
本文介绍了如何实现天青MobileAppController C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2 TableController 2我的表。此外,我需要另一个控制器,它从表中数据处理。

I have 2 TableController for 2 my tables. Also I need another controller, which process data from tables.

Azure中的<一个href=\"https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-dotnet-backend-how-to-use-server-sdk/#how-to-define-a-custom-api-controller\"相对=nofollow>文档说我应该声明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。你可以在这里找到一个教程: http://www.entityframeworktutorial.net/entityframework6/introduction.aspx

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#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆