当SeriviceStack.Aws同步我的模型时,我想设置一个自定义的读写能力。
我有这个型号
[Alias("TABLE-NAME")]
public class Company
{
[AutoIncrement]
public int CompanyId { get; set; }
public int CountryId { get; set; }
public string ShortName { get; set; }
public string DocumentNumber { get; set; }
public string FullName { get; set; }
public string Address { get; set; }
public DateTime CreatedAt { get; set; }
}并且是用以下代码创建的
var awsDb = new AmazonDynamoDBClient();
var db = new PocoDynamo(awsDb)
.RegisterTable<Company>();
db.InitSchema();如何设置自定义读写能力?
发布于 2016-06-23 02:43:51
ProvisionedThroughput容量可以通过表POCO上的ProvisionedThroughputAttribute设置,也可以通过ReadCapacityUnits和WriteCapacityUnits属性在PocoDynamo客户端上控制默认值。
表是由InitSchema调用创建的,该调用首先检查已注册表类型是否具有ProvisionedThroughputAttribute优先,而返回到客户指定的容量默认设置为10读、5写。
https://stackoverflow.com/questions/37981144
复制相似问题