Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

3

There are various problems with your code, eg the tight coupling to SqlConnection, and the fragile base class problem that you risk saddling yourself with by coupling Process to the child class methods DeleteStep1Data and Transform. The problem with tightly coupling things to SqlConnection is that you make the code far harder to test: there has to be a ...


2

Some things to think about: Creating the IoC container need not be the first thing you do. In fact, reading configuration should generally happen first, partially because other aspects of the IoC configuration might depend on that too. For example, maybe your configuration lets you switch between completely different data sources, that therefore require ...


1

By far the easiest way to handle this is to use a local package source. If you make .net standard class libraries you can package them automatically after each build in VS. I guess you could automate further with a post build script. Most people find the whole rigmarole of pushing, waiting for the build, pulling down the new nuget etc to the second project ...


1

I've run into similar problems with wanting to use a TryParse/Convert/etc. method where I sometimes need to know how and why it failed. I ended up taking inspiration from how some serializers handle errors and using events. This way the syntax for my TryX(..., out T) method looks as clean as any other and reliably returns a simple false as the pattern ...


1

Having thought of this for quite some time, I have now come to the same conclusion as the user @Andy. I'm assuming that your Products API would be at least authenticated and authorised. That should prevent rogue clients from creating random product objects in your database. The question now is, whether you should handle the task of generating the ids on ...


Only top voted, non community-wiki answers of a minimum length are eligible