tomasfabian / Joker

Reactive data changes from SQL server to .NET clients. SqlTableDependency extensions, Joker.OData, Joker.Redis, Joker.MVVM and ksqlDB LINQ provider
MIT License
69 stars 23 forks source link

FarServiceUniqueName is not being considered #25

Closed MMR-19 closed 1 year ago

MMR-19 commented 1 year ago

I have a .NET application, with SignalR integration. I am using SqlTableDependency.Extensions and using the UniqueScope for the Lifetime. However I want to change the name of the objects on my database (trigger, service, contracts, SP, ...).

protected override SqlTableDependencySettings<Notification> OnCreateSettings()
{
    var settings = base.OnCreateSettings();
    settings.FarServiceUniqueName = "ProjectName";
    settings.IncludeOldValues = true;

    return settings;
}

The code above doesn't appear to change the objects name on the database, and the Environment.MachineName is what is being considered. Should I add anything else to the settings object in order for the database objects to have the FarServiceUniqueName?

MMR-19 commented 1 year ago

I am sorry, but this issue seems to be a duplicate of an already closed one. Feel free to delete it.

tomasfabian commented 1 year ago

Hi @MMR-19, could you try out the release candidate, please:

dotnet add package SqlTableDependency.Extensions --version 3.2.0-rc.1

I can publish a new release in case everything will be ok.

Thank you in advance! Tomas.

MMR-19 commented 1 year ago

Yes Tomas! I have implemented it with the 3.2.0 version and it worked. (Sorry again for opening another issue).

Also I arrived here at your repo, because the SqlTableDependency, from Christian, was blocking my DB with an old trigger. Your implementation seems to solve that and I have it on production with a client. Thank you very much!

I'm happy to share my sample project using .NET MVC, with .NET Framework 4.8 and SignalR.

tomasfabian commented 1 year ago

Hi @MMR-19, I'm glad that my package helped you! I published SqlTableDependency.Extensions v3.2.0.

Regards Tomas.

MMR-19 commented 1 year ago

Correction: The issue from Christian's SqlTableDependency still persists with your implementation Tomas... I had an UniqueScope application and after disabling the application, the trigger and DB objects were not eliminated, causing a "lock" on those tables...

tomasfabian commented 1 year ago

Hi @MMR-19, could you also try out your application with the ApplicationScope lifetime or remove the FarServiceUniqueName, please? Have you been using the SqlTableDependencyProvider without FarServiceUniqueName before, please? Did this issue pop up only after this change?

MMR-19 commented 1 year ago

This issue migrated to https://github.com/tomasfabian/Joker/issues/26. Let's continue the discussion there