Thanks a lot dear :)
Thanks @aaron,
It worked :)
Thanks a lot, @Aaron,
Thanks a lot for your efforts and dedication :)
Thanks Dear :)
Thanks Dear :)
@Aaron
Thanks it worked.
But I didn't get the reason that why it was not working.
Also,
If I comment the below line, it does not give any exception.
MyEntityDetails.MyChildEntity = ObjectMapper.Map<List<MyChildEntityDetailsDto>>(MyChildEntity);
I'm not using multiple threads.
I have tried again by hitting API from Swagger UI, Logs do not have CommonAppService.GetLookupItems. in code also I check there is no relationship with CommonAppService.GetLookupItems.
Please find the logs.
Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. INFO 2017-12-25 10:56:42,358 [3 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action MyCompany.MyProject.Business.Services.MyEntitys.MyEntityAppService.GetMyEntityDetailsforEdit (MyCompany.MyProject.Business.Services) in 493.533ms INFO 2017-12-25 10:56:42,430 [3 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 538.2111ms 500 application/json; charset=utf-8 INFO 2017-12-25 10:57:47,616 [30 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET <a class="postlink" href="http://localhost:22742/api/services/app/MyEntity/GetMyEntityDetailsforEdit?Id=3">http://localhost:22742/api/services/app ... rEdit?Id=3</a>
INFO 2017-12-25 10:57:47,625 [30 ] uthentication.JwtBearer.JwtBearerHandler - Successfully validated the token. INFO 2017-12-25 10:57:47,628 [30 ] uthentication.JwtBearer.JwtBearerHandler - AuthenticationScheme: Bearer was successfully authenticated. INFO 2017-12-25 10:57:47,658 [30 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method MyCompany.MyProject.Business.Services.MyEntitys.MyEntityAppService.GetMyEntityDetailsforEdit (MyCompany.MyProject.Business.Services) with arguments (Abp.Application.Services.Dto.EntityDto) - ModelState is Valid ERROR 2017-12-25 10:57:48,185 [31 ] Mvc.ExceptionHandling.AbpExceptionFilter - There is already an open DataReader associated with this Command which must be closed first. System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first. at System.Data.SqlClient.SqlInternalConMyCompanytionTds.ValidateConMyCompanytionForExecute(SqlCommand command) at System.Data.SqlClient.SqlInternalTransaction.Rollback() at System.Data.SqlClient.SqlTransaction.Dispose(Boolean disposing) at System.Data.Common.DbTransaction.Dispose() at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.Dispose() at Abp.EntityFrameworkCore.Uow.DbContextEfCoreTransactionStrategy.Dispose(IIocResolver iocResolver) in D:\Github\aspnetboilerplate\src\Abp.EntityFrameworkCore\EntityFrameworkCore\Uow\DbContextEfCoreTransactionStrategy.cs:line 84 at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.DisposeUow() in D:\Github\aspnetboilerplate\src\Abp.EntityFrameworkCore\EntityFrameworkCore\Uow\EfCoreUnitOfWork.cs:line 143 at Abp.Domain.Uow.UnitOfWorkBase.Dispose() in D:\Github\aspnetboilerplate\src\Abp\Domain\Uow\UnitOfWorkBase.cs:line 296 at Abp.AspNetCore.Mvc.Uow.AbpUowActionFilter.<OnActionExecutionAsync>d__4.MoveNext() in D:\Github\aspnetboilerplate\src\Abp.AspNetCore\AspNetCore\Mvc\Uow\AbpUowActionFilter.cs:line 51 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__14.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextExceptionFilterAsync>d__23.MoveNext() INFO 2017-12-25 10:57:48,197 [31 ] etCore.Mvc.Internal.ObjectResultExecutor - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. INFO 2017-12-25 10:57:48,216 [31 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action MyCompany.MyProject.Business.Services.MyEntitys.MyEntityAppService.GetMyEntityDetailsforEdit (MyCompany.MyProject.Business.Services) in 564.9765ms INFO 2017-12-25 10:57:48,262 [31 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 613.1618ms 500 application/json; charset=utf-8
But why it's not showing .net core 2.0 in the target framework dropdown list when you right-click the project and select properties.
Whats difference between .net standard and .net core?
What do you suggest? Should I target .net standard or .net core?
@aaron
public Dictionary<int, List<TaxonomyItemsLocDto>> GetLookupItems(GetLookupInput input)
{
var lookup = _commonRepository.GetAll()
.Include(i => i.TaxonomyItems).Select(a=>a)
.Where(p => input.MasterIds.Contains(p.TaxonomyMasterId) && p.AbpLanguages.Name == input.LanguageCode)
.OrderBy(p => p.SortOrder)
.ToList();
var lookups = new List<TaxonomyItemsLocDto>(ObjectMapper.Map<List<TaxonomyItemsLocDto>>(lookup));
Dictionary<int, List<TaxonomyItemsLocDto>> _lookup = new Dictionary<int, List<TaxonomyItemsLocDto>>();
foreach (var l in lookups)
{
if (_lookup.ContainsKey(l.TaxonomyMasterId))
{
_lookup[l.TaxonomyMasterId].Add(l);
}
else
{
_lookup.Add(l.TaxonomyMasterId, new List<TaxonomyItemsLocDto>()
{
new TaxonomyItemsLocDto()
{
TaxonomyItemLocDesc = l.TaxonomyItemLocDesc,
TaxonomyMasterId = l.TaxonomyMasterId,
TaxonomyItemsId = l.TaxonomyItemsId,
TaxonomyItems = l.TaxonomyItems
}
});
}
}
return _lookup;
}