Hi,
I updated AppService like this:
[HttpPost]
//[UnitOfWork(true, System.Data.IsolationLevel.ReadCommitted)]
public async Task<Guid> CollectDataAsync<T>(string reportCode, string formData, string? permission = "") where T : CollectDataBaseDto
{
if (string.IsNullOrEmpty(permission))
{
throw new UserFriendlyException(_localizer["common_msg_DoNotPermission"]);
}
if (!await AuthorizationService.IsGrantedAsync(permission))
{
throw new UserFriendlyException(string.Format(_localizer["common_msg_DoNotPermission_Item"], permission));
}
if (CurrentUser == null)
{
throw new UserFriendlyException(new ArgumentNullException(nameof(CurrentUser)).Message);
}
if (CurrentTenant == null)
{
throw new UserFriendlyException(new ArgumentNullException(nameof(CurrentTenant)).Message);
}
T? paraObject = default(T);
if (!string.IsNullOrEmpty(formData))
{
paraObject = JsonConvert.DeserializeObject<T>(formData);
}
Dictionary<string, object> keyValueParams = new Dictionary<string, object>();
if (paraObject == null)
{
return Guid.Empty;
}
paraObject.ReportCode = reportCode;
if (CurrentUser != null && CurrentUser.Id.HasValue)
{
paraObject.CurrentUserId = CurrentUser.Id.Value;
string department = await GetCurrentDepartmentAsync();
if (!string.IsNullOrEmpty(department))
{
paraObject.Department = department;
}
}
if (CurrentTenant != null && CurrentTenant.Id.HasValue)
{
paraObject.TenantId = CurrentTenant.Id.Value;
}
Logger.LogInformation("Para object: {0}", paraObject.ObjectToString());
var properties = paraObject.GetType().GetProperties();
foreach (var prop in properties)
{
keyValueParams.Add(prop.Name, prop.GetValue(paraObject) ?? string.Empty);
}
Guid reportPeriodId;
try
{
using (var uow = UnitOfWorkManager.Begin(requiresNew: true, isTransactional: true, isolationLevel: System.Data.IsolationLevel.ReadCommitted))
{
using (_dataFilter.Disable<ISoftDelete>())
{
reportPeriodId = await _reportDataRepository.CollectDataAsync(reportCode, paraObject.ReportDate, paraObject.Department, keyValueParams);
}
await uow.CompleteAsync();
}
return reportPeriodId;
}
catch (Exception ex)
{
throw new UserFriendlyException(ex.Message);
}
}
Hi,
If so, I understand that, I can't run my app with Abp Studio, right? So how can I run my entire app? use Tye?
Hi,
In version 7.3, I already had some services in DDD, so can I use those services in version 9.0 in parallel? It means that, if I create new service I will follow the architect of version 9.0 but old services are still in old architect of version 7.3?
Hi,
In Abp Studio, can I still use DDD for each service in my app? If yes, pls tell me how.
Hi,
Thank you. It works.
Hi,
Already sent the log file. Pls check.
You only need the log of AuthServer, right?
Hi,
Tks for your suggestion, It fixes my issue. conn.SearchAsync is very slow.