public async Task UpdateFileCid(string Id, string cid, FileCidStatus status) { using (var scope = GlobalServices.Container.BeginLifetimeScope()) { var repository = scope.Resolve <IFilPanRepository>(); await repository.UpdateFileCid(Id, cid, status); await repository.Commit(); } }
public async Task <IList <FileCid> > GetFileCids(FileCidStatus status, int skip, int limit) { using (var scope = GlobalServices.Container.BeginLifetimeScope()) { var repository = scope.Resolve <IFilPanRepository>(); var fileCids = await repository.GetFileCids(status, skip, limit); return(fileCids); } }
public async Task UpdateFileCid(string id, FileCidStatus status, string error = "") { using (var scope = GlobalServices.Container.BeginLifetimeScope()) { var repository = scope.Resolve <ICloudSpeedRepository>(); await repository.UpdateFileCid(id, status, error); await repository.Commit(); } }
public async Task UpdateFileCid(string id, FileCidStatus status, string error) { var entity = await DbContext.FileCids.FirstOrDefaultAsync(a => a.Id == id); if (entity != null) { entity.Status = status; entity.Error = error; entity.Updated = DateTime.Now; } }
public async Task UpdateFileCid(string Id, string cid, FileCidStatus status) { var entity = await DbContext.FileCids.FirstOrDefaultAsync(a => a.Id == Id); if (entity != null) { entity.Cid = cid; entity.Status = status; entity.Updated = DateTime.Now; } }
public async Task <IList <FileCid> > GetFileCids(FileCidStatus status, int skip, int limit) { return(await DbContext.FileCids.AsNoTracking().Where(a => a.Status == status).Skip(skip).Take(limit).ToListAsync()); }