Base solution for your next web application

Activities of "qstamps"

We have updated our asp.net zero version from 11.4.0 to 13.0.0(.Net 8 and Angular). We have fixed all the issues and the project is running perfectly fine. But recently we are facing some issues when trying to do the add migration process. Not able to understand the region of the issue. Please help as soon as possible.

PM> add-migration FAApplication_Mains_table_changes-new Build started... Build succeeded. No store type was specified for the decimal property 'MaximumAllowedAmount' on entity type 'MainBudgetTemplate'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'MaximumRequestedAmount' on entity type 'MainBudgetTemplate'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'AnnualPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'DailyPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'MonthlyPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'WeeklyPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'RequestedAmount' on entity type 'FAApplication_Budget'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'AwardAmount' on entity type 'FAApplication_Main'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'Awarded' on entity type 'FAApplication_Main'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'ConversionRate' on entity type 'FAApplication_Main'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'InitialRequestedAmount' on entity type 'FAApplication_Main'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'PercentCompleted' on entity type 'FAApplication_Main'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'RequestedAmount' on entity type 'FAApplication_Main'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'Score' on entity type 'FAApplication_Main'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'MaximumAward' on entity type 'FA_FundingDetail'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'MinimumAward' on entity type 'FA_FundingDetail'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'FundAmount' on entity type 'FA_RevenueSource'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'RequiredCashMatch' on entity type 'FA_RevenueSource'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'RequiredInKindMatch' on entity type 'FA_RevenueSource'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'RevertAllocationAmount' on entity type 'FA_RevenueSourceRevert'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'RevertAmount' on entity type 'FA_RevenueSourceRevert'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'Appropriation_Amount' on entity type 'Awards_Appropriation'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'TotalFundAmount' on entity type 'Fund'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'Amount' on entity type 'SubscriptionPayment'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'FundAmount' on entity type 'Program'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'ProgramFund_Amount' on entity type 'ProgramFund'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'Points' on entity type 'Question_Section'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'PercentCompleted' on entity type 'ReviewerApplication'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'TotalReviewScore' on entity type 'ReviewerApplication'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. No store type was specified for the decimal property 'Score' on entity type 'ReviewerApplicationResponse'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationsModelDiffer.Initialize(ColumnOperation columnOperation, IColumn column, RelationalTypeMapping typeMapping, Boolean isNullable, IEnumerable1 migrationsAnnotations, Boolean inline) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationsModelDiffer.InitializeColumnHelper(ColumnOperation columnOperation, IColumn column, Boolean inline) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationsModelDiffer.Diff(IColumn source, IColumn target, DiffContext diffContext)+MoveNext() at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationsModelDiffer.DiffCollection[T](IEnumerable1 sources, IEnumerable1 targets, DiffContext diffContext, Func4 diff, Func3 add, Func3 remove, Func4[] predicates)+MoveNext() at System.Linq.Enumerable.ConcatIterator1.MoveNext() at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationsModelDiffer.Diff(ITable source, ITable target, DiffContext diffContext)+MoveNext() at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationsModelDiffer.DiffCollection[T](IEnumerable1 sources, IEnumerable1 targets, DiffContext diffContext, Func4 diff, Func3 add, Func3 remove, Func4[] predicates)+MoveNext() at System.Linq.Enumerable.ConcatIterator1.MoveNext() at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationsModelDiffer.Sort(IEnumerable1 operations, DiffContext diffContext) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationsModelDiffer.GetDifferences(IRelationalModel source, IRelationalModel target) at Microsoft.EntityFrameworkCore.Migrations.Design.MigrationsScaffolder.ScaffoldMigration(String migrationName, String rootNamespace, String subNamespace, String language) at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.AddMigration(String name, String outputDir, String contextType, String namespace) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType, String namespace) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigration.<>c__DisplayClass0_0.<.ctor>b__0() at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.

Please help ASAP we are stuck on this. All our development also stopped.

Yeah! I am able to solve that challenge.

I am sharing the step, hope it will help someone else.

File 1: MyProject/aspnet-core/src/MyProject.Web.Core/UiCustomization/Metronic/UiThemeCustomizerBase.cs

    protected async Task<T> GetSettingValueForUserAsync<T>(string settingName, int? tenantId, long userId) where T : struct
{
    return (await SettingManager.GetSettingValueForUserAsync(ThemeName + "." + settingName, tenantId ,userId)).To<T>();
}
protected async Task<string> GetSettingValueForUserAsync(string settingName, int? tenantId, long userId)
{
    return await SettingManager.GetSettingValueForUserAsync(ThemeName + "." + settingName, tenantId, userId);
}

File 2: MyProject/aspnet-core/src/MyProject.Web.Core/UiCustomization/Metronic/ThemeDefaultUiCustomizer.cs N.B: Need to done for every Theme--UiCustomizer.cs

    public async Task<UiCustomizationSettingsDto> GetUiSettings(int? tenantId, long? userId)
{
    var settings = new UiCustomizationSettingsDto
    {
        BaseSettings = new ThemeSettingsDto
        {
            Layout = new ThemeLayoutSettingsDto
            {
                //DarkMode = await GetSettingValueAsync<bool>(AppSettings.UiManagement.DarkMode)
                DarkMode = await GetSettingValueForUserAsync<bool>(AppSettings.UiManagement.DarkMode, tenantId, userId > 0 ? (long) userId : 0)
            },
            SubHeader = new ThemeSubHeaderSettingsDto
            {
                FixedSubHeader = true,
                //SubheaderStyle = await GetSettingValueAsync(AppSettings.UiManagement.SubHeader.Style),
               SubheaderStyle = await GetSettingValueForUserAsync(AppSettings.UiManagement.SubHeader.Style, tenantId, userId 0 ? (long)userId : 0),
                ContainerStyle = "subheader py-2 py-lg-4 subheader-solid toolbar"
            },
            ....
    return settings;
}

File 3: MyProject/aspnet-core/src/MyProject.Application/UiCustomization/IUiCustomizer.cs

    Task<UiCustomizationSettingsDto> GetUiSettings(***int? tenantId, long? userId***);

File 4: MyProject/aspnet-core/src/MyProject.Application/Configuration/UiCustomizationSettingsAppService.cs

    public async Task<List<ThemeSettingsDto>> GetUiManagementSettings()
{
    var settings = new List<ThemeSettingsDto>();
    var themeCustomizers = _iocResolver.ResolveAll<IUiCustomizer>();

    foreach (var themeUiCustomizer in themeCustomizers)
    {
        var themeSettings = await themeUiCustomizer.GetUiSettings(***AbpSession.TenantId, AbpSession.UserId***);
        settings.Add(themeSettings.BaseSettings);
    }

    return settings;
}

File 5: MyProject/aspnet-core/src/MyProject.Application/Sessions/SessionAppService.cs

    public async Task<GetCurrentLoginInformationsOutput> GetCurrentLoginInformations()
{
    .....
        var uiCustomizer = await _uiThemeCustomizerFactory.GetCurrentUiCustomizer();
        output.Theme = await uiCustomizer.GetUiSettings(***AbpSession.TenantId, AbpSession.UserId***);
        ......
}

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version?
  • v11.2.1
  • What is your product type (Angular or MVC)?
  • Angular
  • What is product framework type (.net framework or .net core)?
  • .net core

If issue is about UI

  • Which theme are you using?
  • Default
  • What are the theme settings?
  • Default

Can we make dark mode user specific? My application is a single tanent application. I want to make the dark mode and light mode user specific not tanent specific. Could you please help me with that?

Thank You :)

When we are try to open demo.gvgrantcloud url it's taking to much time to load. Can you able to give me a inside about how to optimise the website.

Showing 1 to 4 of 4 entries