Esempio n. 1
0
        protected static IQueryable <ChirpEntity> Find()
        {
            CloudStorageAccount account = CloudStorageAccount.FromConfigurationSetting("DataConnectionString");
            ChirpContext        context = new ChirpContext(account.TableEndpoint.ToString(), account.Credentials);

            return(context.ChirpEntities);
        }
Esempio n. 2
0
        public static Chirp Add(string username, string text)
        {
            CloudStorageAccount account = CloudStorageAccount.FromConfigurationSetting("DataConnectionString");
            ChirpContext        context = new ChirpContext(account.TableEndpoint.ToString(), account.Credentials);
            DateTime            now     = DateTime.UtcNow;

            context.AddChirp(username, text, now);
            return(new Chirp(username, text, now));
        }