Base solution for your next web application

Activities of "leonkosak"

Ok. Thank you. That also explains why insert speed are so well (compared to read)?

We found samo interesting.

If a file is sent directly as base64 string in JSON (from .Application project), then it took much more time if we run the same SQL query, then create a file in temp folder with this binary data (and return FileDto object with a token) and then client application call .downloadTempFile(fileDto) method.

In both situations, the SQL query took the same time, but response time was much different.

I also tried described scenario in a different environment and the results (time difference) was also quite big.

Why is sending a base64 string of file via .Application API so much slower?

Of course. You can always generate previous versions of ASP.NET Zero. The latest version based on .NET Core 2.1 is v6.3.1.

That's all true, but as I can see ABP.IO (and paid components) is focused on upgradability. Besides that, Volosoft has now dedicated designer and ABP.IO-based solutions will have it's own theme (also greater support for theming). Let's face it - Metronic is a big messy container of open-source libraries and components with awful documentation and bad support. Each major version (after 1.5-2 years) is a complete rewrite and after 5 iterations I cannot understand that kind of development in Keenthemes team. Most of us are using dedicated components (like DevExtreme) and we don't care about PrimeNG and other stuff. Maybe sweetalert and some other "easy components" (alerts, buttons,...), but personally, I use DevExtreme for all components in my applications. I would prefer that ABP.IO themes would have "options" that would "visually integrate" with DevExtreme (and other component suites - Telerik,...).

Question

I have a little specific update scenario. In database table, we have to update entity - just one property. But the problem is that each record has relatively large binary object (varbinary - few megabytes at least). There is issue in Azure environment when only one property of such entity has to be updated but we always get error when calling _repository.GetById(id). (There is no issue if we read this binary object inside entity, write it to temp folder location so that client application gets FileDto object to download it).

How can we implement such update scenario? Thank you for suggestions.

I will post it tomorrow. But anway: There is no problem if query is without binary data filed included. On local installations, there is no such problem, but execution time is really slow.

ERROR 2019-04-26 04:39:02,652 [23 ] Mvc.ExceptionHandling.AbpExceptionFilter - An error occurred while updating the entries. See the inner exception for details. Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: The wait operation timed out --- End of inner exception stack trace --- at System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__122_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__278_1(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) --- End of stack trace from previous location where exception was thrown --- at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteAsync(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary2 parameterValues, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(DbContext _, ValueTuple2 parameters, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IReadOnlyList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Abp.EntityFrameworkCore.AbpDbContext.SaveChangesAsync(CancellationToken cancellationToken) at Abp.Zero.EntityFrameworkCore.AbpZeroCommonDbContext3.SaveChangesAsync(CancellationToken cancellationToken) at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.SaveChangesInDbContextAsync(DbContext dbContext) at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.SaveChangesAsync() at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.CompleteUowAsync() at Abp.Domain.Uow.UnitOfWorkBase.CompleteAsync() at Abp.AspNetCore.Mvc.Uow.AbpUowActionFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync() 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() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync() INFO 2019-04-26 04:39:02,721 [23 ] .Mvc.Infrastructure.ObjectResultExecutor - Executing ObjectResult, writing value of type 'Abp.Web.Models.AjaxResponse'. INFO 2019-04-26 04:39:02,786 [23 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action xxxx (xxxx.Application) in 31729.9908ms INFO 2019-04-26 04:39:02,847 [23 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 32032.3872ms 500 application/json; charset=utf-8

This is from Logs.txt file. There is no record in AbpAuditLogs table.

Yes, I know and it is much faster. Maybe I have to move this varbinary data to seperate table, so that EF won't load it by default.

With ExecuteSqlCommand method, you lose advantages of strongly-typed queries.

That's absolutely true what Ismail wrote. Aprox. 2 years ago, I started with ASP.NET Boilerplate and then ASP.NET Zero based on .NET Framework and jQuery. I have basically no knowledge of Angular (and no experience with ABP/Zero architecture and practices). But I have courage to start enterprise project with .NET Core and Angular based on ANZ and today I can say that learning ANZ/ABP and Angular (and a little .NET Core) was the best stack which boost my productivity multiple times and even beta versions of software is much more stable than ever.

@commondesk: It's not fair that you blame application framework for not knowing library or framework "inside" ABP/ANZ. Just accept reallity - modern full-stack web is noticeable more complex than native (desktop and other native) frameworks. There are so many libraries and frameworks and each of them have active development. After all -in ANZ you have plenty of Angular/C#/... examples. Of course, there is always room for improvements (like going towards Reactive Forms in Angular projects,...), but with ABP/ANZ learning courve is much faster. The only real competition to ABP/Zero is Orchard Core platform mostly because of upgradability (which will be solved with abp.io).

ANZ is currently not prepared for In-Process hosting model. There was an issue on GitHub for this particular feature, but was not implemented because of some difficulties.

Showing 11 to 20 of 55 entries