Base solution for your next web application

Activities of "mhdbaz"

today I tried the Abp for .NET core I copied the same code for from my old project I run the project the difference in calling the APIs was like this

MVC 5.x was 30 milliseconds

ASP.NET Core was 735 milliseconds

Which is very bad performance of course. and I advice all the developers to try the Abp core before starting any project.

Hope in the future it will be fixed.

How to add ValidateAntiForgeryToken attribute for the generated Application Service API ?

I do not want to add ValidateAntiForgeryToken for all of them.

I found the solution its because of EntityFramework.DynamicFilters 2.2.0

I down grade EntityFramework.DynamicFilters to 1.4.11 and its working.

I found the solution its because of EntityFramework.DynamicFilters 2.2.0

I down grade EntityFramework.DynamicFilters to 1.4.11 and its working.

I am getting this exception after updating Abp to latest version. This exception I am getting when use

IApplicationLanguageManager

Example

ApplicationLanguageManager.GetLanguagesAsync(null)

I get this exception.

In Abp 0.9.0 there is no exception.

System.MissingMethodException was unhandled by user code HResult=-2146233069 Message=Method not found: 'Void EntityFramework.DynamicFilters.DynamicFilterExtensions.Filter(System.Data.Entity.DbModelBuilder, System.String, System.Linq.Expressions.Expression1<System.Func3<!!0,!!1,Boolean>>, !!1)'. Source=Abp.EntityFramework StackTrace: at Abp.EntityFramework.AbpDbContext.OnModelCreating(DbModelBuilder modelBuilder) at System.Data.Entity.Internal.LazyInternalContext.CreateModelBuilder() at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) at System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input) at System.Data.Entity.Internal.LazyInternalContext.InitializeContext() at System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes() at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext() at Abp.EntityFramework.AbpDbContext.RegisterToChanges() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.EntityFramework\EntityFramework\AbpDbContext.cs:line 129 at Abp.EntityFramework.AbpDbContext..ctor(String nameOrConnectionString) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.EntityFramework\EntityFramework\AbpDbContext.cs:line 73 at myproject.FrontEnd.EntityFramework.FrontEndDbContext..ctor(String nameOrConnectionString) in D:\myproject\myprojectFrontEnd\myproject.FrontEnd.EntityFramework\EntityFramework\FrontEndDbContext.cs:line 43 InnerException:

I am getting this exception after updating Abp to latest version. This exception I am getting when use

IApplicationLanguageManager

Example

ApplicationLanguageManager.GetLanguagesAsync(null)

I get this exception.

In Abp 0.9.0 there is no exception.

System.MissingMethodException was unhandled by user code HResult=-2146233069 Message=Method not found: 'Void EntityFramework.DynamicFilters.DynamicFilterExtensions.Filter(System.Data.Entity.DbModelBuilder, System.String, System.Linq.Expressions.Expression1<System.Func3<!!0,!!1,Boolean>>, !!1)'. Source=Abp.EntityFramework StackTrace: at Abp.EntityFramework.AbpDbContext.OnModelCreating(DbModelBuilder modelBuilder) at System.Data.Entity.Internal.LazyInternalContext.CreateModelBuilder() at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) at System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input) at System.Data.Entity.Internal.LazyInternalContext.InitializeContext() at System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes() at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext() at Abp.EntityFramework.AbpDbContext.RegisterToChanges() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.EntityFramework\EntityFramework\AbpDbContext.cs:line 129 at Abp.EntityFramework.AbpDbContext..ctor(String nameOrConnectionString) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.EntityFramework\EntityFramework\AbpDbContext.cs:line 73 at myproject.FrontEnd.EntityFramework.FrontEndDbContext..ctor(String nameOrConnectionString) in D:\myproject\myprojectFrontEnd\myproject.FrontEnd.EntityFramework\EntityFramework\FrontEndDbContext.cs:line 43 InnerException:

I want to use Dapper as Data Access layer also I must be able to connect to two databases. now I can create two entity framework context and do not use the entity framework just use the connection string from the context. but I would like build Dapper integration for boilerplate and contribute on this. How can I start ? I looked at Abp.EntityFramework My question is just a general guide lines

which classes I should implement and How to register them and let the boilerplate use them UnitOfWorkBase AbpRepositoryBase

Is there are any other things I should pay attention to them ?

Could any one please explain how to use ImpersonatorTenantId and ImpersonatorUserId ?

I did not find any documentation about where to set these values and how to use them

<cite>hikalkan: </cite> If you are injecting application service via class (like YourAppService) instead of interface (like IYourAppService) then you should make your app service method as virtual. Thus, you can remove UnitOfWork attr from the controller.

Ok thanks

UnitOfWorkManager.Current is null inside the the AppService classes if I did not add [UnitOfWork] Attribute in the controller action

[HttpPost]
        [UnitOfWork]
        //[ValidateAntiForgeryToken()]
        public virtual async Task<ActionResult> Register(SignUpUserInput model)
        {
            var ttt = _unitOfWorkManager.Current;
            //await _userAppService.SignUpUser(model);
            //throw new UserFriendlyException("Test UI Exception");
            try
            {
                CheckModelState();
                //var validateCaptchaResult = ValidateCaptcha();
                //if (!validateCaptchaResult.Succeeded)
                //{
                //    throw new Exception(validateCaptchaResult.Errors.FirstOrDefault() ??  string.Empty);
                //}
                await _userAppService.SignUpUser(model);
                return RedirectToAction("RegistrationCompleted");
            }
            catch (Exception ex)
            {
                ViewBag.ErrorMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    ViewBag.ErrorMessage += "<br>" + ex.InnerException.Message;
                }
                return View(model);
            }
        }

The code above if I removed [UnitOfWork] attribute on the Controller action the UnitOfWorkManager.Current will be null insdie the _userAppService.

Is that normal by Design ? Should I add [UnitOfWork] to all controller actions ?

Showing 1 to 10 of 13 entries