Base solution for your next web application

Activities of "strix20"

According to the Asp.Net Core documentation you just need to add the following method call inside the AddDbContext setup in the PreInitialize() method of the framework core module?

options.UseLazyLoadingProxies();

You should just need a log4net appender set up.

We use Graylog, so I don't have any experience with Sentry, but a cursory google search found this:

[https://github.com/MCKanpolat/SharpRaven.Log4Net.Core])

I'm late to this party, unfortunately, as I could have provided some guidance since we implemented a similar solution several weeks ago.

We went one step further, however, and replace the TenantCacheItem so that we could have a strongly typed azure storage connection string, as well as any other tenant-specific items we would need in the future.

We also added an extension method to ITenantCache to GetExtendedCacheItem that will cast to our more specific type.

It's not the cleanest, but IMO it's better than using CustomData when you need more than 1 extra property (otherwise you have to simply know what's being stored on the custom data object and cast it everywhere accordingly, making extending and refactoring a nightmare.)

It's a shame that ITenantCache wasn't made as generic, that would have been a FAR cleaner solution.

It's not a bug, it's by design, as Volosoft has clearly pointed out.

<cite>aaron: </cite>

In this case it appears that the common hub defined in abp.signalr-client.js will never start, thus breaking notifications.

That is correct if abp.signalr.autoConnect was set to false. For now, try:

// Before
abp.signalr.connect = function () {
   ...
}

// After
const connect = abp.signalr.connect;
abp.signalr.connect = function () {
   connect && connect();
   ...
}

Actually, a custom SignalR client should ignore abp.signalr.autoConnect.

How do we extend an existing hub once it is registered? I need to add some methods to the common hub, in addition to defining a new hub of my own.

You cannot add methods to the common hub (on the server side). You might be able to add methods to the client:

abp.signalr.hubs.common.on('myMethod', function () {
   ...
});

There is also an issue of the duplication of the following in both files:

abp.signalr.startConnection = startConnection;

    if (abp.signalr.autoConnect === undefined) {
        abp.signalr.autoConnect = true;
    }



    if (abp.signalr.autoConnect) {
        abp.signalr.connect();
    }

This causes the signalR connection bootstrapping to occur twice when autoconnect is enabled.

That still doesn't explain how to start them properly.

In the case of abpcommonhub and chathub, they both set the method abp.signalr.connect, thus overriding eachother and only allowing the chathub to connect when autostart is disabled.

<cite>gep13: </cite> Hello,

In the generated Index.js files for the entities I have created, I am seeing lines like this:

ajaxFunction: _computersService.getAll,

For querying all the records from the database. I have created a custom method in my controller that I want to call instead of the default getAll method, however, I am unable to find the _computersService defined anywhere to add that method to.

Can someone please point me in the right direction?

Thanks Gary

Hey Gary,

With Asp Zero, we don't create controller methods for javascript. ABP Framework dynamically generates proxies for all of your application services (defined in the Application project), and exposes them through dynamically created scripts.

If you want to expose a custom function, you just need to add it to the corresponding Application Service.

In your case, you want to find the computersService in your application project.

Make sure to update the interface in the application.shared project, as well.

What version are you downloading? They update nuget packages with every release.

Integration tests will always take a long time, and because of that, they aren't suited for CI.

These types of tests are generally run on nightly build servers, as opposed to per commit like you would do with unit tests.

We created a second test project (technically two test projects, one for unit tests for domain, and one for unit tests for application.)

The only tests we include in our CI configuration in team city are the unit tests. They execute very quickly, with minimal impact on our build servers.

In general, I find unit tests to be much more valuable tests, because they tell you exactly where your code is failing, whereas integration tests only really tell you if your layers are connected properly. If an integration test fails, it's not immediately clear where the failure is occurring. Add to that the greater potential for unexpected issues related to things like differences between in-memory db and sql server, and you can spend a lot of time running in circles for a non-issue.

That's not to say they aren't valuable. They absolutely are. They just shouldn't serve as a replacement for unit tests, and if you're adding your own tests to the project, I would recommend investing the time in unit tests over integration tests, if you're constrained on development time.

I would add that in EF6, you could generate code models from a database using the code first approach.

Code scaffolding from database was a stretch feature for EF core 2.1, but it did not make the cut for release, it looks like. You can track the feature here: [https://github.com/aspnet/EntityFrameworkCore/issues/831])

Showing 11 to 20 of 115 entries