© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
39 replies
Shinyshark

Unable to create an object of type 'UnitOfWork'. [Answered]

Hello everyone. I have two projects; one is an API and the other is a DAL (Data Access Layer). I want the DbContext and the Migrations to live in the DAL. However, it seems I have to add migrations via the API project.

How can I create migrations in the DAL project?
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

Unable to create an object of type 'JsonContext'
C#CC# / help
14mo ago
InvalidCastException: Unable to cast object of type
C#CC# / help
13mo ago
Unable to create an object of type 'DBCSDBContext'. For the different patterns supported at design t
C#CC# / help
3y ago