public async Task DownloadEntity(string uid) { if (uid == null) { throw new ArgumentNullException(nameof(uid)); } var entityUid = RepositoryEntityUid.Parse(uid); if (string.IsNullOrEmpty(entityUid.Version)) { HttpContext.Response.StatusCode = (int)HttpStatusCode.BadRequest; return; } await _repositoryService.DownloadEntityAsync(entityUid); }