Base solution for your next web application

Activities of "AuroraBMS"

Hi @ismcagdas,

Apologies for the delay. We are on version 11.2.0 currently, are all of the packages on the latest version ivy compatible?

Regards,

Hi Ismcagdas,

I've tried different versions, new versions, historical versions and all of them work normally until ELSA is involved.

I've followed the MVC guide, I followed the steps for getting the dashboard up and running on and that is fine, everything works perfectly except for nswag generation for serivce proxies.

I've tried excluding elsa from nswag generation, i've added in filters and it keeps generating the service proxies.

Is there some guidance that you can provide in getting this up and running please. Another part that is also a nightmare now is the api-version being added to all endpoints, if I am not mistaken, this should also be something that should not be occuring due to how aspnetzero does not use version and it should be isolated to elsa only. getFriendProfilePicture(userId: number | undefined, tenantId: number | undefined, **api_version: string **| undefined): Observable<GetProfilePictureOutput> {

Any assistance in getting this up and running on a blank solution will be greatly appreciated.

Had the same issue. Downgrading swagger in web.core to 6.2.3 helps currently.

Some possible Related information on this: https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/2368 https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2373

Not sure if there is a negative effect with downgrading currently.

100% will send a sample project with the issue to [email protected]

Hi Ismcagdas,

I've tried the above and it still results in the same issue.

Updated code:

public async Task DailySync()
        {
            try
            {
                //using (var unitOfWork = UnitOfWorkManager.Begin(TransactionScopeOption.RequiresNew))
                //{
                    var queryString = _queryManager.Single(x => x.QueryName == "GetDaily_OCRD").QueryString;

                    hanaConnection.Open();
                    HanaDataReader reader = null;
                    HanaCommand data = new HanaCommand(queryString, hanaConnection);
                    reader = data.ExecuteReader();
                    List<BusinessPartnerMasterData> existingDataList = new List<BusinessPartnerMasterData>();
                    existingDataList = _businessPartnerMasterData.GetAll().ToList();


                    if (reader != null)
                    {
                        while (reader.Read())
                        {

                            bool isNew = false;
                            BusinessPartnerMasterData existingData = existingDataList.Where(x => x.Id == Convert.ToString(reader.GetValue("CardCode"))).FirstOrDefault();
                            if (existingData == null)
                            {
                                existingData = new BusinessPartnerMasterData();
                                isNew = true;
                            }

                            existingData.Id = Convert.ToString(reader.GetValue("CardCode"));
                            existingData.BusinessPartnerTypeId = Convert.ToString(reader.GetValue("CardType"));
                            existingData.CardCode = Convert.ToString(reader.GetValue("CardCode"));
                            existingData.CardName = Convert.ToString(reader.GetValue("CardName"));
                            existingData.IsActive = Convert.ToString(reader.GetValue("validFor")) == "Y" ? true : false;

                        await _businessPartnerMasterData.InsertOrUpdateAndGetIdAsync(existingData);

                        //    await _businessPartnerMasterData.InsertAsync(existingData);
                        //if (isNew)
                        //    await _businessPartnerMasterData.InsertAsync(existingData);
                        //else
                        //    await _businessPartnerMasterData.UpdateAsync(existingData);
                    }


                }

                //    await UnitOfWorkManager.Current.SaveChangesAsync();
                //    await unitOfWork.CompleteAsync();
                //}
            }
            catch (System.Exception ex)
            {

                //TODO: Notification logic (TBC)
            }
        }

Hi @ismcagdas,

Please see below:

using Abp.BackgroundJobs; using Abp.Dependency; using Abp.Domain.Repositories; using Abp.Domain.Uow; using Abp.EntityFrameworkCore; using Abp.Runtime.Session; using BRM.Configuration; using BRM.MultiTenancy; using BRM.MultiTenancy.Dto; using BRM.Web.Startup.Hangfire.Helpers; using Hangfire; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Sap.Data.Hana; using System.Collections.Generic; using System.Data; using System.Linq.Dynamic.Core; using System.Linq; using BRM.SystemSetup; using BRM.InventoryManagement; using System; using System.Transactions;

namespace BRM.Web.Startup.Hangfire.DataSyncs.Inbound { public class StockMasterDataInboundSync : BackgroundJob<int>, ITransientDependency { private readonly IRepository<Tenant, int> _tenantAppService; private readonly IRepository<QueryManager, long> _queryManager; private readonly IRepository<StockMasterData, string> _stockMasterData; private DataConnections _dataConnections; private IDbContextProvider<AbpDbContext> _Context; public IAbpSession _abpSession; private QueryHelpers _qH; private HanaConnection hanaConnection;

    private readonly IConfigurationRoot _appConfiguration;
    private readonly IWebHostEnvironment _hostingEnvironment;

    public StockMasterDataInboundSync(
        IWebHostEnvironment env,
        IDbContextProvider&lt;AbpDbContext&gt; Context,
        IAbpSession abpSession,
        IRepository&lt;Tenant, int&gt; tenantAppService,
        DataConnections dataConnections,
        IRepository&lt;QueryManager, long&gt; queryManager,
        IRepository&lt;StockMasterData, string&gt; stockMasterData)
    {
        _hostingEnvironment = env;
        _appConfiguration = env.GetAppConfiguration();
        _abpSession = abpSession;
        _Context = Context;
        _tenantAppService = tenantAppService;
        _dataConnections = dataConnections;
        _queryManager = queryManager;
        _stockMasterData = stockMasterData;
        hanaConnection = _dataConnections.GetHanaConnectionInstance
         (
             _appConfiguration.GetValue&lt;string&gt;("SAPHanaODBCConnectionDetail:Server"),
             _appConfiguration.GetValue&lt;string&gt;("SAPHanaODBCConnectionDetail:UserName"),
             _appConfiguration.GetValue&lt;string&gt;("SAPHanaODBCConnectionDetail:Password")
         );

    }



    [DisableConcurrentExecution(timeoutInSeconds: 10 * 60)]
    [AutomaticRetry(Attempts = 0)]
    [UnitOfWork]
    public override void Execute(int number)
    {
        
        //updated this from the standard (UnitOfWorkManager.Begin()) due to a post on here
            using (var unitOfWork = UnitOfWorkManager.Begin(TransactionScopeOption.RequiresNew))
            {
                var queryString = _queryManager.Single(x => x.QueryName == "GetDaily_OITM").QueryString;

                hanaConnection.Open();
                HanaDataReader reader = null;
                HanaCommand data = new HanaCommand(queryString, hanaConnection);
                reader = data.ExecuteReader();

                if (reader != null)
                {
                    while (reader.Read())
                    {
                     
                     
                            //_stockMasterData.InsertOrUpdateAndGetId(new StockMasterData()
                            _stockMasterData.InsertOrUpdate(new StockMasterData()
                            {
                                Id = Convert.ToString(reader.GetValue("ItemCode")),
                                ItemCode = Convert.ToString(reader.GetValue("ItemCode")),
                                ItemName = Convert.ToString(reader.GetValue("ItemName")),
                                IsActive = Convert.ToString(reader.GetValue("validFor")) == "Y" ? true : false
                            });
                       

                    }

                    reader.Close();
                }
                //this area has been modified several times with varying completion/save segments.
                UnitOfWorkManager.Current.SaveChanges();
                unitOfWork.Complete();
                //UnitOfWorkManager.Current.SaveChangesAsync().Wait();
                //unitOfWork.CompleteAsync().Wait();
            }
       
    }


}

}

HI @ismcagdas,

I'm experiecning the same issue currently.

I've tried using the bulk insert as well now. It was however on a freshly created project with a bunch of standard entities created without any custom code yet.

I've had this a few times when trying to use it on a from scratch project when you migrate versions and have been getting it for a while now. Attempted to use it with 11.0.1 now again as I am getting stuck on standard repository functions not working with hangfire. Below is the error:

ERROR_005: The monthly trial period is expired (2022-01-01). You can extend your trial by downloading the latest version as the beginning of every month. More information can be found here: https://entityframework-extensions.net/trial

System.Exception: ERROR_005: The monthly trial period is expired (2022-01-01). You can extend your trial by downloading the latest version as the beginning of every month. More information can be found here: https://entityframework-extensions.net/trial at .(ProviderType , Boolean , Boolean , Boolean , Boolean ) at Z.BulkOperations.BulkOperation.Execute() at Z.BulkOperations.BulkOperation.BulkInsert() at .BulkInsert[T](DbContext this, IEntityType entityType, IEnumerable1 list, Action1 options, SavingSelector savingSelector, Boolean forceSpecificTypeMapping) at .BulkInsert[T](DbContext this, IEnumerable1 entities, Action1 options, Boolean isBulkSaveChanges) at .(DbContext this, List1 , Action1 ) at .(DbContext this, StateManager , IReadOnlyList1 , Action1 ) at .(DbContext this, StateManager , IReadOnlyList1 , Action1 ) at .(DbContext this, Action1 , DbContext ) at DbContextExtensions.BulkSaveChanges(DbContext this, Action1 options) at DbContextExtensions.BulkSaveChanges(DbContext this) at BRM.Web.Startup.Hangfire.DataSyncs.Inbound.BusinessPartnerMasterDataInboundSync.Execute(Int32 number) in C:\Users\user\Source\Repos\BRMV11.0.1\aspnet-core\src\BRM.Web.Host\Startup\Hangfire\DataSyncs\Inbound\BusinessPartnerMasterDataInboundSync.cs:line 149 at Castle.Proxies.BusinessPartnerMasterDataInboundSyncProxy.Execute_callback(Int32 number) at Castle.Proxies.Invocations.BusinessPartnerMasterDataInboundSync_Execute.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.InterceptSynchronous(IInvocation invocation) at Castle.DynamicProxy.AsyncDeterminationInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.BusinessPartnerMasterDataInboundSyncProxy.Execute(Int32 number)

Found the issues. Default tenant is not seen as the main host but rather just another instance/tenant. So in order to actually access the real host on the system you have to untick the tenant and not handle the default tenant as the host and other tenants added on later as tenants only.

@bartkoolhaas check if you untick tenant after opening the site you should be able to see your menu's if multi tenancy is enabled for you.

Running this command will resolve you EF issue: dotnet tool install --global dotnet-ef

also the UI for the default theme is still broken in this version after being deployed

Showing 1 to 10 of 54 entries