© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
11 replies
Davaaron

❔ Load *.sql files (How to handle them?)

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?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Unpacking .dll Files for NuGet Dependencies: How to Handle It?
C#CC# / help
3y ago
✅ How to handle websockets?
C#CC# / help
11mo ago
How to Dump and save objects to a file to load them later?
C#CC# / help
3y ago
❔ Link text files to SQL database using C#
C#CC# / help
3y ago