【发布时间】:2014-02-06 22:45:25
【问题描述】:
我按照 windows azure 页面中有关如何将我的应用程序连接到移动服务的步骤进行操作,但在代码的最后一行中不断出现此错误:“PhoneApp1.App 不包含‘mobileservice’的定义”。 我添加了对 WindowsAzure.MobileServices 包的引用,但它没有帮助。我该怎么办?
这是我的代码:
namespace PhoneApp1
{
public class Item
{
public string Id { get; set; }
public string Text { get; set; }
}
public partial class Signup_Page : PhoneApplicationPage
{
public static MobileServiceClient MobileService = new MobileServiceClient(
"https://ppmobserv.azure-mobile.net/",
"kiejvLOaNFeLZKYsFqhPQMzRgXEylc66"
);
public Signup_Page()
{
InitializeComponent();
}
private async void InsertItem()
{
Item item = new Item { Text = "Awesome item" };
await App.MobileService.GetTable<Item>().InsertAsync(item);
}
}
}
【问题讨论】:
-
你究竟遵循了哪个教程,有链接吗?
标签: windows-phone azure-mobile-services