Activities of "abhichan26"

Ours is a tiered application with Blazor Web Assembly as a UI framework with Entity Framework and SQL Server. • ABP Framework version: v5.3 • UI type: / Blazor Web Assembly • DB provider: EF Core • Tiered (MVC) : Yes • Identity Server Separated : yes

We are publishing message to Kafka using AbpEventBusKafkaModule and we are successfully able to publish message for pre-defined event types EntityCreatedEto<T> is published when an entity of type T was created. EntityUpdatedEto<T> is published when an entity of type T was updated. EntityDeletedEto<T> is published when an entity of type T was deleted.

But there are few places where we are using Stored procedure instead of _myRepository.AddAsync(myDto) or _myRepository.UpdateAsync(myDto), we are making a call to stored procedure as shown below. When we are adding or updating a record through stored procedure , messages are not written to Kafka topic.

public async Task<int> AddXYZ(ABCDto myData, CancellationToken cancellationToken = default) { try { await EnsureConnectionOpenAsync(cancellationToken); int generatedId = 0;

            //Creating new output parameter to strore generated Id when record is created
            var myReturnId= new SqlParameter("@GeneratedId", SqlDbType.Int)
            {
                Direction = ParameterDirection.Output
            };
            using (var command = CreateCommand("AddCustomDetails", CommandType.StoredProcedure, new SqlParameter[] {
                                        new SqlParameter("@Code", myData.Code),
                                        new SqlParameter("@Description",  myData.Description),
                                        myReturnId
        }))
            {
                await command.ExecuteNonQueryAsync(cancellationToken);
                generatedId = (int)myReturnId.Value;
            }
                            return generatedId;//
        catch (System.Exception)
        {
            throw;
        }
    }

Questions: 1.Can you please help how to publish messages when we are updating the records through stored procedure?

2.One possible approach we can think of is publishing explicit messages as shown below in case of adding or updating the records through stored procedure but how do we append EventName with .Created or .Updated in the ETO? await _distributedEventBus.PublishAsync( new ABCEto { //map the properties from DTO to ETO }

3.Please suggest if explicit publishing as mentioned in point 2 is the recommended approach or suggest any better option.?

Our client application is https://rise-test ,our identity server is https://rise-identity-test and our api host is https://api-internal-test/rise , api gateway is https://api-internal-test and the endpoint are in the rise folder.

We are able to deploy the three services but IdentityServer is throwing error when we try to login: “The cookie 'XSRF-TOKEN' has set 'SameSite=None' and must also set 'Secure'.”

We follow the steps in the article(https://www.thinktecture.com/en/identityserver/prepare-your-identityserver/) and still the issue is not resolved.

How do we solve this error?

Showing 1 to 2 of 2 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11