Entity CodeFirst EF6,EntityData string id [英] Entity CodeFirst EF6, EntityData string id
问题描述
已经开始使用Azure移动服务的实体代码,并遇到一些问题:
Have started to use Entity Code First with Azure Mobile Services and have met some issue:
对于使用TableController与Entity对象,我需要从EntityData中导出每个对象我提供字符串的id字段!
For using TableController with Entity objects I need to derive each of them from EntityData class, that provide string Id field!
我曾经使用int,long和even guid替换为string的string,所以...
I used to use int, long and even guid instead string for id, so...
这是什么好处?
插入操作和最佳做法是什么?
字符串ID的性能如何?
What is benefits of this? What about insert operation and what is the best practice for this? What about performance for string id?
推荐答案
@carlosfigueira对于在这里使用字符串id的更改有一个很好的写作: http://blogs.msdn.com/b/carlosfigueira/archive/2013/11/23/new-tables-in-azure-mobile-services-string-id- system-properties-and-optimistic-concurrency.aspx
@carlosfigueira has a good writeup about the change to using string id here: http://blogs.msdn.com/b/carlosfigueira/archive/2013/11/23/new-tables-in-azure-mobile-services-string-id-system-properties-and-optimistic-concurrency.aspx
这篇关于Entity CodeFirst EF6,EntityData string id的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!