Пример #1
0
        public async Task <string> CreateFileDeal(string cid)
        {
            using (var scope = GlobalServices.Container.BeginLifetimeScope())
            {
                var repository = scope.Resolve <ICloudSpeedRepository>();
                var entity     = new FileDeal()
                {
                    Cid = cid
                };
                await repository.CreateFileDeal(entity);

                await repository.Commit();

                return(entity.Id);
            }
        }
Пример #2
0
 public async Task CreateFileDeal(FileDeal entity)
 {
     await DbContext.FileDeals.AddAsync(entity);
 }