Esempio n. 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))));
 }
Esempio n. 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 });
        }
Esempio n. 3
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)));
 }
Esempio n. 4
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 });
 }