Hi,
Im creating a backend in NET Core and I do not want to use EF Core as I need to extend my SQL knowledge, so I thought it's good to use SqlDataClient and raw SQL. So far so good.
My solution structure is like this:
- Domain (contains Models and SQL scripts)
- Infrastructure (contains Repositories, Services, SQLManager [classes to create database, tables, call sql scripts, etc)
- Web API (controllers that use the services in the infrastructure)
My idea was to store the SQL scripts along the models as resource files and have them in a *.resx file or maybe call the files programmatically, but I think the first option is good for resolving compile errors.
I wonder if I can reference the *.resx files from another project (infrastructure)?
How do you typically deal with *.sql files that you call in your programs?