I have a classLibrary Project(. Net Framework 4.6.1) namely 'EmployeeDataAccess', it contains an ADO.Net Entity Data Model (.edmx) configured successfully to my SQL-server. I have a separate ASP.Net Web API Project namely 'WebAPI'. Have added reference of the 'EmployeeDataAccess' class library in 'WebAPI' Project. Finally created a controller namely 'EmployeeController.cs' & in namespace when 'using EmployeeDataAccess', the type or namespace could not be found. I have even added reference to EntityFramework, System.Data.Entity, System.Data.Entity.Design in 'WebAPI' Project Reference but still the controller is unable to recognize the 'EmployeeDataAccess' namespace?
Unable to refer in namespace the class library in it ado.net entity data model .edmx in asp.net web application webapi
64 Views Asked by Atul Kumar At
1
There are 1 best solutions below
Related Questions in ASP.NET
- Implementing Azure AD B2C Authentication in .NET 8 Blazor Project (RenderMode: InteractiveAuto)
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- IIS Rewrite Module exclude bots but allow GoogleBot
- Angular 16 sending null values to API
- I am the domain admin, newbie, how do I connect youtube.com on my domain?
- Dropdown list showing SQLServer2005SQLBrowserUser$DONSERVER instead of Active Directory group name in ASP.NET MVC C#
- ASP.NET Identity, Losing Ability to Login until Application Pool Recycles
- How to unprotect ASP.NET FormAuthentication cookie
- How does it work using ASP.NET FormAuthentication
- What is the purpose of a completely standalone 'this'?
- Is there a way to read .csproj PropertyGroup variable in c#
- MSBuild trying to copy different dll with similar name into project sporadically
- Minimizing IdentityServer4 Round Trips in Microservice Architecture with Ocelot
- Azure AD guest account in web app authentication user claims data
- Receiving 400 bad request on post when customer auth handler is used
Related Questions in ASP.NET-WEB-API
- Log to Dynatrace using Serilog and web.config .NET Framework API
- How to create a REST API with .NET Framework?
- ASP.NET Core Background task with service container
- App gateway closing connection after 100 requests
- Web API works with Windows authentication enabled when consumed via Swagger but throws an unauthorized issue when accessed through web app
- The 'GetUriByAction' method in the LinkGenerator class in Asp.Net Core is not defined in the Repository layer of the project
- Entity Tracking Conflict when Authenticating Users in ASP.NET Core API
- Class validation on response body in .NET WebApi
- My ASP.NET server does not work and I am wondering what's missing, when I open Swagger, I get error 500
- How to split Serilog log file into multiple files?
- Response payload is not odata payload
- How can I upload picture
- Web Forms aspx - PostAsync Web API
- do you know any free reporting services like devexpress or boldreports?
- WebAPI don't deserialize JSON but same payload works in Swagger
Related Questions in ENTITY-FRAMEWORK-4
- How can i bind same column in DbModelBuilder for IdentityUser's two different properties
- how to make a relationship between 3 tables using the Join() method and using two values as a rule Entity Framework
- Linq to SQL: GroupBy() and Max() to get set of data
- Migrate from EF to EF Core. Unloaded entity in the For Loop
- How to use translate Max(value) and Group By (Value/100) in VB LINQ?
- C# MVC with Entity Framework Database Initializer failing
- Is it possible to compare with a number in "Where"?
- Function mapping in Entity framework
- EF Core - problem with inheritance from table and use primary key in the next table
- Entity Framework Datetime Conversion
- How to use older version of Entity Framework when updating Model
- Entity Remove() is setting foreign key properties to null
- Passing empty DataTable to SQL Server stored procedure through database context
- Improving performance of Linq to SQL list intersection
- The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'Join'.- Linq JOIN with multiple condition
Related Questions in CLASS-LIBRARY
- Load Class library dll in powershell
- Mah apps resource not found in a wpf class library
- How do I add a class library here in Microsoft Visual Studio Code?
- .NET Framework 4.5.2-based Console application compatibility problems with .NET 6-based Class Library project
- How to create a class library (c#) in visual studio code using .net 4.7 version
- How can I log to a specific file path with log4j2 in a library?
- How to send data between Class Library and Winforms (both are different projects)
- Error adding a WinUI 3 class library reference to a WinUI 3 blank app
- Error on BlazorWebView and Class Library with Winform
- Source Generators for class library project in c#
- Class library is not found while building the ASP.NET Core 7 Web API with Github Actions
- Blazor WebAssembly stuck on Loading... when configuring dependency injection for a class library
- Blazor a Class Library reference in the WebAssembly client is failing to connect .NET 6
- Shared class library - MAUI and ASP.NET Core
- NU1102 Unable to find package Communications.Interface with version (>= 6.0.0)
Related Questions in ADO.NET-ENTITY-DATA-MODEL
- 2 DataGridView with cascade update and ADO.NET Entity Data Model
- Entity Framework 6 not displaying database tables after display successful popup
- How to Use Oracle Database in Entity Data Model
- Problem with getting data from a SQL table with foreign keys in a WCF project in Visual Studio
- Why does Entity Framework return null object?
- How to get SQL Server variable limit in C#
- Store data from XML in relational SQL database
- Update model from Firebird database
- how to generate the Repository and model/entity classes with all CRUD operations using database-first apporach in C#
- How to name relationships in ado.net data model, mvc 5 c#
- Save the date in and display it in the good format
- Add and Edit methods do not work properly
- How to redirect login page after successfull message
- Unable to refer in namespace the class library in it ado.net entity data model .edmx in asp.net web application webapi
- I'm testing a WCF Service and an EF Data layer, receiving String columns as (null), but receive integers as real data. Why are the strings null?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
After much research, finally, this is what worked for me:- 1. Added reference to the "latest version of EntityFramework to both class library and main project" to which reference of the class library was to be added. 2. The "Property window of the class library" showed the assembly name and namespace name different from the class library name. Renamed "assembly & namespace name that matched the class library name". 3. Finally, the "using directive in the controller class" of the main project was able to identify the "class library reference" added to the main project.