C#C
C#15mo ago
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; }
    }
}


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
Was this page helpful?