コード例 #1
0
 private static IEnumerable <Tuple <string, object> > CreateQuery(StatusInsertBatch batch)
 {
     return(EnumerableEx.Concat(
                new[] { Tuple.Create(_statusInserter, (object)batch.Status) },
                new[] { _statusEntityCrud.CreateDeleter(batch.Status.Id) },
                batch.StatusEntities.Select(e => Tuple.Create(_statusEntityInserter, (object)e))));
 }
コード例 #2
0
        public static async Task StoreStatus(
            DatabaseStatus status,
            IEnumerable <DatabaseStatusEntity> statusEntities,
            DatabaseUser user,
            IEnumerable <DatabaseUserDescriptionEntity> userDescriptionEntities,
            IEnumerable <DatabaseUserUrlEntity> userUrlEntities)
        {
            var batch = new StatusInsertBatch
            {
                Status                  = status,
                StatusEntities          = statusEntities,
                User                    = user,
                UserDescriptionEntities = userDescriptionEntities,
                UserUrlEntities         = userUrlEntities
            };

            await StoreStatuses(new[] { batch });
        }
コード例 #3
0
ファイル: Database.cs プロジェクト: Mojopon/StarryEyes
 private static IEnumerable<Tuple<string, object>> CreateQuery(StatusInsertBatch batch)
 {
     return EnumerableEx.Concat(
         new[] { Tuple.Create(_statusInserter, (object)batch.Status) },
         new[] { _statusEntityCrud.CreateDeleter(batch.Status.Id) },
         batch.StatusEntities.Select(e => Tuple.Create(_statusEntityInserter, (object)e)));
 }
コード例 #4
0
ファイル: Database.cs プロジェクト: Mojopon/StarryEyes
 public static async Task StoreStatus(
     DatabaseStatus status,
     IEnumerable<DatabaseStatusEntity> statusEntities,
     DatabaseUser user,
     IEnumerable<DatabaseUserDescriptionEntity> userDescriptionEntities,
     IEnumerable<DatabaseUserUrlEntity> userUrlEntities)
 {
     var batch = new StatusInsertBatch
     {
         Status = status,
         StatusEntities = statusEntities,
         User = user,
         UserDescriptionEntities = userDescriptionEntities,
         UserUrlEntities = userUrlEntities
     };
     await StoreStatuses(new[] { batch });
 }