Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sqlite 使用Azure Mobile apps客户端sdk在SQL Lite中定义外键_Sqlite_Xamarin.forms_Azure Mobile Services - Fatal编程技术网

Sqlite 使用Azure Mobile apps客户端sdk在SQL Lite中定义外键

Sqlite 使用Azure Mobile apps客户端sdk在SQL Lite中定义外键,sqlite,xamarin.forms,azure-mobile-services,Sqlite,Xamarin.forms,Azure Mobile Services,在使用azure mobile app client sdk时,如何在sql lite中定义类似外键的关系。下面是我的代码 public class Employee{ public string Id { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public string Email { get; set; } publi

在使用azure mobile app client sdk时,如何在sql lite中定义类似外键的关系。下面是我的代码

public class Employee{  
  public string Id { get; set; }  
  public string FirstName { get; set; }  
  public string LastName { get; set; }  
  public string Email { get; set; }  
  public string Title { get; set; }  
  public string PhotoUrl { get; set; }  
} 

public class TimelineItem
{
    public string Id { get; set; }
    public Employee Author { get; set; }
    public string Text { get; set; }
    public string PhotoUrl { get; set; }
}

var store = new MobileServiceSQLiteStore("myStorage.db");
store.DefineTable<Employee>();
store.DefineTable<TimelineItem>();
公共类雇员{
公共字符串Id{get;set;}
公共字符串名{get;set;}
公共字符串LastName{get;set;}
公共字符串电子邮件{get;set;}
公共字符串标题{get;set;}
公共字符串PhotoUrl{get;set;}
} 
公共类时间项
{
公共字符串Id{get;set;}
公共雇员作者{get;set;}
公共字符串文本{get;set;}
公共字符串PhotoUrl{get;set;}
}
var store=new mobileseservicesqlitestore(“myStorage.db”);
store.DefineTable();
store.DefineTable();
但当我运行代码并检查数据库时,它不会在两个实体之间创建关系,而是创建名为Author的JSON类型字段。我尝试过一对多关系和外键属性,但没有任何效果。
我正在使用DB browser for SQL lite检查数据库。

根据microsoft,mobile sdk不支持团队关系。欲知详情