© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•17mo ago•
15 replies
Zee

the namespace is not recognised

hey so I am making a wpf app that will be a flight booking app but I will be storing user data on an azure sql database I am trying to create a REST API and so far I have made a ASP.NetService named FakeFlightBookingAPI I made this class named ApplicationDbContext to interact with my database here and I am trying ref my Admin and Customer classes that are part of my WPF project not my ASP project and my code is below

using Microsoft.EntityFrameworkCore;
using FakeFlightBookingApp.Model;
namespace FakeFlightBookingAPI.Data
{
    public class ApplicationDbContext : DbContext
    {
        public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { }


        public DbSet<Admin> AdminUsers { get; set; }
        public DbSet<Customer> RegularUsers { get; set; }
    }
}
using Microsoft.EntityFrameworkCore;
using FakeFlightBookingApp.Model;
namespace FakeFlightBookingAPI.Data
{
    public class ApplicationDbContext : DbContext
    {
        public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { }


        public DbSet<Admin> AdminUsers { get; set; }
        public DbSet<Customer> RegularUsers { get; set; }
    }
}


my errrors are

Severity Code Description Project File Line Suppression State Details
Error CS0246 The type or namespace name 'FakeFlightBookingApp' could not be found (are you missing a using directive or an assembly reference?) FakeFlightBookingAPI D:\Zeeshan\Documents\FakeFlightBookingAPI\Data\ApplicationDbContext.cs 2 Active


Severity Code Description Project File Line Suppression State Details
Error CS0246 The type or namespace name 'Customer' could not be found (are you missing a using directive or an assembly reference?) FakeFlightBookingAPI D:\Zeeshan\Documents\FakeFlightBookingAPI\Data\ApplicationDbContext.cs 11 Active

Severity Code Description Project File Line Suppression State Details
Error CS0246 The type or namespace name 'Admin' could not be found (are you missing a using directive or an assembly reference?) FakeFlightBookingAPI D:\Zeeshan\Documents\FakeFlightBookingAPI\Data\ApplicationDbContext.cs 10 Active
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

❔ namespace 'Models' does not exist in the namespace 'BlazorBookGroup'
C#CC# / help
4y ago
✅ [Solved] Linux - Workload ID android is not recognised
C#CC# / help
2y ago
The name "___" does not exist in the namespace "clr-namespace:redfish.Controls"
C#CC# / help
5mo ago
✅ the type or namespace name 'ListingProjects' does not exist in the namespace models
C#CC# / help
11mo ago