public void Add(PushServiceToken t) { PushServiceTokenDb d = new PushServiceTokenDb(t); context.AttachTo(TableName, d, null); context.UpdateObject(d); context.SaveChangesWithRetries(); context.Detach(d); }
public PushServiceTokenDb(PushServiceToken token) { this.PartitionKey = "Cust" + token.CustomerID; this.RowKey = token.Token; this.CustomerID = token.CustomerID; this.Provider = token.Provider; this.Token = token.Token; }
public List<PushServiceToken> TokensForCustomer(long CustomerID) { CloudTableQuery<PushServiceTokenDb> b = (from e in context.CreateQuery<PushServiceTokenDb>(TableName) where e.PartitionKey == "Cust" + CustomerID.ToString() select e).AsTableServiceQuery<PushServiceTokenDb>(); List<PushServiceToken> items = new List<PushServiceToken>(); foreach (PushServiceTokenDb item in b) { PushServiceToken t = new PushServiceToken(); t.CustomerID = item.CustomerID; t.Provider = item.Provider; t.Token = item.Token; context.Detach(item); items.Add(t); } return items; }
public void Delete(PushServiceToken t) { throw new NotImplementedException(); }
public void Add(PushServiceToken t) { PushServiceTokenDb d = new PushServiceTokenDb(t); context.AddObject(TableName, d); context.SaveChangesWithRetries(); }
public void PushServiceToken(PushServiceToken t) { t.CustomerID = ((DareyaIdentity)HttpContext.Current.User.Identity).CustomerID; TokenRepo.Add(t); }