ben SKVU4-9YBC
.NET EF - How to generate a new database in runtime (dynamically)?
In EF, databases are by default created at runtime anyway, when you start up the application, if they don't already exist. You can just go about it in the same manner, passing your dynamic database name into
DbContextOptions
and ensure it's being created with ctx.Database.EnsureCreatedAsync()
23 replies
Using ref for large data types.
I would not. Confirm that by making a change to one of the files in the list inside
CheckValidFileTypes
and step outside back into the SaveDataToStorage
method, and the change is still reflected. You'll know then that no copies are made and it just passes around references10 replies
Using ref for large data types.
ASFAIK a list just contains a copy of the reference not the actual object. Meaning if you change something something on an object inside
SaveDataToStorage
you'll see the same changes when you step outside in files
. You can confirm this quite easily10 replies
✅ Theoretical question. MediatR and DTO and onion structure
That's what I've been doing for a while. AutoMapper is reflection convention based which is really popular. I just don't like the black box nature of it. I feel more comfortable seeing all my mappings explicitly. Not so familiar with all these new terminologies, I'm guessing it's a bit like clean architecture which I've seen and used to some degree myself. I never really force an architectural pattern to projects, it tends to just come out naturally. My domain is always at the very bottom with no dependencies above. I don't really do all the database adapter stuff bob martin harps on about
16 replies