Activities of "murat.yuceer"

HI,

See https://github.com/abpframework/abp/pull/9701

It is available in 5.0

Thanks, i hope you could add "External provider settings" too

Hi liangshiwei,

I created fresh project with version 4.4.0, I did not see the following features

Do you have plan add this to default Standard edition properties

Enable account external settings Management Enable email settings Management

Or

When i select "Enable setting management" from features just show this settings for tenants

Tenant should edit own Email Settings and Account External provider settings. These are important settings that distinguish between tenants.

Hi maliming great solution i will try. I shared with them if no problem https://supportcenter.devexpress.com/ticket/details/t1021441/objectdatasource-dependecy-injection

Actualy they have working example https://github.com/DevExpress-Examples/Reporting-Entity-Framework-Core-In-AspNet-Core They have explanation about dependecy injection scope, if you look maybe you can understand problem

*This project demonstrates how to use the ObjectDataSource as a report's data source adapter for the Entity Framework DbContext.

ASP.NET Core application with Entity Framework provides data to a report as DbContext object that operates in the scope of an HTTP request whose lifetime is different from the report's lifetime. A report is created in the HTTP request context and starts a background thread to get data and create a document. A report needs data after the initial HTTP request is completed. This means a report cannot use the default DbContext instance that the Entity Framework creates in the scope of HTTP request.

This example demonstrates the approach that addresses the issues described above. The approach has the following requirements:

The application needs a repository that provides data to a report.

The repository's lifetime exceeds the lifetime of the HTTP request that creates the repository.

A repository requests the ScopedDbContextProvider instance to create DbContext on demand.

The HTTP request contains information used to filter data. For example, when you use the user ID to restrict access to reports. A repository, instantiated within the HTTP request's scope, stores the user ID so it is available in the filter criteria.

The repository reads and saves values available in the HTTP request context. The values are stored for later use, so the repository saves the current user ID instead of the context-dependent IUserService object.

The repository reads and saves the current user ID in its constructor. The constructor is invoked in the context of the HTTP request and has access to context-dependent data.*

  • ABP Framework version: v4.3.0
  • UI type: Blazor
  • DB provider: EF Core

Hello, I try to use devexpress xtrareport with their objectdatasource but i get error "Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed."

This is my objectdatasource class, i bind to report get method

    [HighlightedClass]
    public class ObjectDataSource : ITransientDependency
    {

        private readonly IServiceScopeFactory _serviceScopeFactory; // <== HERE DISPOSED = TRUE

        public ObjectDataSource( IServiceScopeFactory serviceScopeFactory){
              _serviceScopeFactory = serviceScopeFactory;
        }

        [HighlightedMember]
        public async Task<IEnumerable<DataModel>> Get(Guid id)
        {
            var scope = _serviceScopeFactory.CreateScope(); // _serviceScopeFactory is disposed here

...

            return dataModel;
        }
    }
}

At first I implemented this interface "IWebDocumentViewerReportResolver" to override xtrareport's creating progress (xtrareport contain objectdatasource)

public class WebDocumentViewerReportResolver : IWebDocumentViewerReportResolver
{
    ObjectDataSourceInjector DataSourceInjector { get; }
    ReportStorageWebExtension ReportStorageWebExtension { get; }

    public WebDocumentViewerReportResolver(
        ReportStorageWebExtension reportStorageWebExtension,
        ObjectDataSourceInjector dataSourceInjector)
    {
        DataSourceInjector = dataSourceInjector ?? throw new ArgumentNullException(nameof(dataSourceInjector));
        ReportStorageWebExtension = reportStorageWebExtension ?? throw new ArgumentNullException(nameof(reportStorageWebExtension));
    }

    public XtraReport Resolve(string reportEntry)
    {
        using (MemoryStream ms = new MemoryStream(ReportStorageWebExtension.GetData(reportEntry)))
        {
            var report = XtraReport.FromStream(ms);
            DataSourceInjector.Process(report); // HERE I resolve object datasource services
            return report;
        }
    }
}

Here, i resolved services as devexpress recommend

namespace Kuys.Shared.AspNetCore.DevExp.Reporting.HttpApi
{
    public class ObjectDataSourceInjector
    {
        private readonly IServiceProvider _serviceProvider;

        public ObjectDataSourceInjector(IServiceProvider serviceProvider)
        {
            _serviceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider));
        }

        public void Process(XtraReport report)
        {
            var dse = new UniqueDataSourceEnumerator();
            ((IServiceContainer)report).ReplaceService(typeof(IReportProvider), _serviceProvider.GetRequiredService<IReportProvider>());
            foreach (var dataSource in dse.EnumerateDataSources(report, true))
            {
                if (dataSource is ObjectDataSource ods && ods.DataSource is Type dataSourceType)
                {
                    ods.DataSource = _serviceProvider.GetRequiredService(dataSourceType); // <== DISPOSE = FALSE
                }
            }
        }
    }
}

Thanks

  • ABP Framework version: v4.4.0
  • UI type: Blazor Server
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): no

Hi how can i override tenant change panel

I couldnt find in account source code

Hi, how can i change tenant change panel?

Hi,

See: https://docs.abp.io/en/abp/latest/Timing

Configure<AbpClockOptions>(options => 
{ 
    options.Kind = DateTimeKind.Local; 
}); 

Hi, liangshiwei i think abp always store UTC +0 on database right? But client side we need to store setting about client UTC. Where do we set this

Thanks, i think this can be optional. Like language settings on feature

Showing 31 to 40 of 76 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13