Base solution for your next web application

Activities of "BlueBrackets"

I have the same issue, using npm on a Windows 10 machine. The file 'ion.rangeSlider.skinFlat.css' doesn't exist in the package. By removing it from the bundle-config.json and the package-mapping-config.js it was solved.

Answer

The validator class should be public, but the other thing is that the validator class should be placed in solutionname.Application project instead of the solutionname.Application.Shared where the dto's are located.

After moving the validator class and making it public the validation is working, thanks for your help.

Question

I'm using the MVC core template and try to implement FluentValidation. I've installed the package Abp.FluentValidation and set the DependsOn attribute for the type AbpFluentValidationModule at the WebCoreModule class.

I've added the validator class below for the input class of a service but seems not to validate, any value for NumberOfUnits is valid.

class CreateOrEditUnitDtoValidator : AbstractValidator<CreateOrEditUnitDto>
    {
        public CreateOrEditUnitDtoValidator()
        {
            RuleFor(x => x.NumberOfUnits).GreaterThanOrEqualTo(10);
        }
    }

Do I miss something or is the fluent validation not working on services?

I've removed my migration scripts, updated the snapshot file and removed my entities from the database. On my entities I've implemented ISoftDelete instead of and queryfilter with fluid. I've created a migration, updated the database and everything is working as expected.

Issue is solved.

The tenantId in the created records match the tenantId of the tentant creating the record.

When I run SQL Server profiler the following query is created (2 reference properties where not shown in the class definition in my previous message).

And it is missing the tenantid

SELECT COUNT(*)
FROM [Countries] AS [e]
LEFT JOIN (
    SELECT [e0].*
    FROM [TenantLanguages] AS [e0]
    WHERE [e0].[IsDeleted] = 0
) AS [t] ON [e].[DefaultLanguageId] = [t].[Id]
LEFT JOIN (
    SELECT [e1].*
    FROM [Currencies] AS [e1]
    WHERE [e1].[IsDeleted] = 0
) AS [t0] ON [e].[DefaultCurrencyId] = [t0].[Id]
WHERE [e].[IsDeleted] = 0

and

SELECT [e].[Id], [e].[Code], [e].[CreationTime], [e].[CreatorUserId], [e].[DefaultCurrencyId], [e].[DefaultLanguageId], [e].[DeleterUserId], [e].[DeletionTime], [e].[Description], [e].[IsDeleted], [e].[IsInEU], [e].[IsLocal], [e].[LastModificationTime], [e].[LastModifierUserId], [e].[TenantId], [t].[Id], [t].[Code], [t0].[Id], [t0].[Code]
FROM [Countries] AS [e]
LEFT JOIN (
    SELECT [e0].*
    FROM [TenantLanguages] AS [e0]
    WHERE [e0].[IsDeleted] = 0
) AS [t] ON [e].[DefaultLanguageId] = [t].[Id]
LEFT JOIN (
    SELECT [e1].*
    FROM [Currencies] AS [e1]
    WHERE [e1].[IsDeleted] = 0
) AS [t0] ON [e].[DefaultCurrencyId] = [t0].[Id]
WHERE [e].[IsDeleted] = 0

I'm using V5.6.1 ASP.NET Core MVC & jQuery. With the power tool I've created a Country entity but when I add data by multiple tenants all data is shown for every tenant. Is this Core related or am I missing something?

Multitenancy is enabled. Configuration.MultiTenancy.IsEnabled = BlueBracketsConsts.MultiTenancyEnabled;

[Table("Countries")]
    public class Country : FullAuditedEntity , IMustHaveTenant
    {
		public int TenantId { get; set; }

		[Required]
		public virtual string Code { get; set; }
   }

Hi @yekalkan,

It is working, the version control didn't show the new files created but were on disk. Thanks for your support!

Hello @yekalkan,

I've updated my solution with the new assembly en tried to run it again. The result is better but not working 100%, the new source files are not created although the log says they are. The modified files are actually correctly modified. I've also run it with the sudo command but makes no difference.

This is the loginfo from terminal

iMac:AspNetZeroRadTool rob$ dotnet aspnetzeroradtool.dll Product.json -> Entity is being generated. -> AppService is being generated. -> ..\src\BlueBrackets.Core\Authorization\AppPermissions.cs is being modified. -> ..\src\BlueBrackets.Core\Authorization\AppAuthorizationProvider.cs is being modified. -> Consts is being generated. -> ..\src\BlueBrackets.EntityFrameworkCore\EntityFrameworkCore\BlueBracketsDbContext.cs is being modified. -> AppServiceInterface is being generated. -> Dtos.EntityDto is being generated. -> Dtos.CreateOrEditDto is being generated. -> Dtos.GetAllInput is being generated. -> ..\src\BlueBrackets.Application\CustomDtoMapper.cs is being modified. Running add-migration... Could not run add-migration

When I run the radtool like described in [https://aspnetzero.com/Documents/Development-Guide-Rad-Tool-Mac-Linux]) an error occurs in the file creation.

Instead of creating the file "src\BlueBrackets.Core\Products\Product.cs" it creates a file "AspNetZeroRadTool..\src\BlueBrackets.Core\Products\Product.cs" in the folder aspnet-core

Instead of creating the file "src\BlueBrackets.Application\Products\ProductsAppService.cs" it creates a file "AspNetZeroRadTool..\src\BlueBrackets.Application\Products\ProductsAppService.cs" in the folder aspnet-core

And then the process aborts with an exception

Unhandled Exception: System.IO.FileNotFoundException: Could not find file '/Volumes/Macintosh SSD 500Gb/Projects/BlueBrackets/aspnet-core/AspNetZeroRadTool..\src\BlueBrackets.Core\Authorization\AppPermissions.cs'. at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks) at System.IO.File.InternalReadAllText(String path, Encoding encoding) at System.IO.File.ReadAllText(String path) at AspNetZeroRadTool.FileWizards.FileModifiers.FileModifier.nWuTVQWImuPgaxdC7jU(Object ) at AspNetZeroRadTool.FileWizards.FileModifiers.FileModifier.GetFileToModify(String filePath) at AspNetZeroRadTool.FileWizards.FileModifiers.Server.AppPermissionsFileModifier.Modify() at AspNetZeroRadTool.ServerSideHandler.sPYOZNWCtCInRDTK7mN(Object ) at AspNetZeroRadTool.ServerSideHandler.Handle() at AspNetZeroRadTool.AspNetZeroRadTool.fS6mXiCGOWTD9kvWpdx(Object ) at AspNetZeroRadTool.AspNetZeroRadTool.Run() at AspNetZeroRadTool.Program.Main(String[] args)

The Product.json is in the folder AspNetZeroRadTool and the command is given from this folder location.

By default the complete content section and header of a view is scrollable, can you please advice how to make the header static and the content part of the view scrollable.

Showing 1 to 10 of 10 entries