New answers tagged

0

When I need to generate report for all Business Units, I have to read ~3kk records from one table, then match profiles with their price, then generate view model and send it. This suggests that you are running one query to get a set of data, then looping through that to query another. This is painfully easy to do with things like Entity Framework and ...


0

Something has to be off with your query. Is the ProfileId a foreign key and are you using Include to load the related data? If you can live with older data, it's most effective to cache the data, either explicitly or even as the view model. The other option is to periodically regenerate the data using a scheduler. If you are on SQL server, it comes with a ...


4

If the purpose is to display on a page the first step is to limit the amount of data returned. No one can process 3 million rows at once, find ways to limit the data returned. Requiring search criteria or only returning X rows per page can drastically speed up performance with no real impact to usability. Ensure you are using SQL to create the result set, ...


0

Following Doc Brown's recommended steps of GUID generation/replacement, and this SO answer to recursively go through all properties of the object graph (https://stackoverflow.com/a/20554262/10340388) I came with the following solution. The function is recursive for collections of objects as well as classes that could hold GUID's. It can probably be cleaned ...


0

Memberwise clone all the green and yellow objects Walk the list of green and yellow objects and update their Guids Add the old and new guid pairs to a Dictionary Walk the list of green and yellow objects again and swap the Refs using the Dictionary created in the previous step You can also serialize and then deserialize to a format that supports object ...


1

The problem of copying the object graph and the problem of assigning new GUIDs to the object graph are very similar, but they can be handled separately and one after another, so let me start with copying first. In case the object graph is just a tree, there may be a simpler solution, but in a comment you mentioned several MainObjects sharing references to ...


0

Windows services are managed by Service Control Manager. This can be queried, even remotely, using WMI. Most people would probably use a system management software like Nagios. There clearly is an impedance mismatch with kubernetes and the idea of a liveliness query. You could run a web server from inside the console app. See this code as an example.


3

A full answer to your question depends on the complexity of deployment. If you are looking to host a single ASP.Net (core or classic) website, with no additional services, then I would recommend the Azure App Services specifically. When testing Azure App Services, the end-to-end story is really nice: Integration with github or Bitbucket git repositories ...


2

On a very high level, you are not missing out on anything crucial. Docker (and Kubernetes) provide a runtime environment, control plane, deployment, network abstraction etc. which are also provided by cloud vendors. They are different mechanisms but they solve the same problems. With containers, it's a little easier to avoid vendor lock-in. Although AWS and ...


2

You can use same .Net standard dll in the projects of type .Net Core and .Net Framework. .NET Standard is the best way to add cross-platform support to a .NET library. .NET Standard is a specification of .NET APIs that are available on all .NET implementations. Targeting .NET Standard lets you produce libraries that are constrained to use APIs that are in a ...


1

By defition the dependency injection is a pattern. The ASP.NET Core is built around dependency injection as it allows great flexibility in the framework. In a plain .NET Core application, the DI pattern can be used and also overused. As with any technology and patterns, in may be used inapropriately. This depends on your application and must be evaulated ...


Top 50 recent answers are included