eskie
eskie
CC#
Created by Asriela on 11/26/2024 in #help
Help with test results
The inconsistent spacing and lack of organization in 1.2, 1.3 would already have me on edge. But 2.3 is the first one that immediately screamed "do not hire" to me. Starting a new coroutine every frame in Update() illustrates a fundamental lack of understanding. That being said this test is kind of dumb, I wouldn't feel too bad. You probably dodged a bullet.
6 replies
CC#
Created by Impulsive on 11/23/2024 in #help
.NET 8.0, PostgreSql and left over Idle sessions
A common approach would be to make repository interfaces for handling your CRUD operations on each table. Then make concrete classes that implement those interfaces, using your sql connections and commands. Other code should reference the interfaces, with the implementations injected using DI. Typically for a web app you'd want to use Scoped, so the service is the same for each request. Transient would create a new service every single time it's needed, even within one request. Usually the scope is the controller and you inject the repository to the controller constructor. If you have a bunch of business logic beyond simple CRUD, you can add another service layer between the controller and repositories. E.g. the CarController gets an ICarService, which coordinates all the appropriate calls to the ICarRepository, ILicensePlateRepository, IVehicleTitleRepository, etc.
19 replies