Hi,
I am getting the following error :
Error 4 'PresentationLayer.AeroLionEntities1' does not contain a definition for 'FlightSchedule' and no extension method 'FlightSchedule' accepting a first argument of type 'PresentationLayer.AeroLionEntities1' could be found (are you missing a using directive or an assembly reference?) C:\Users\kgshi\documents\visual studio 2013\Projects\AeroLion\PresentationLayer\FlightScheduleEF.aspx.cs 22 35 PresentationLayer
Here's the context page ? EFAeroLion.Context.cs
-
-
-
-
-
-
-
-
-
- namespace PresentationLayer
- {
- using System;
- using System.Data.Entity;
- using System.Data.Entity.Infrastructure;
-
- public partial class AeroLionEntities1 : DbContext
- {
- public AeroLionEntities1()
- : base("name=AeroLionEntities1")
- {
- }
-
- protected override void OnModelCreating(DbModelBuilder modelBuilder)
- {
- throw new UnintentionalCodeFirstException();
- }
-
-
-
- public virtual DbSet<FlightSchedule> FlightSchedules { get; set; }
- }
- }
And here's the page that is giving me problem.
My problem is that after the cntx. FlightSchedule doesn't show up but FlightSchedules show up.
Furthermore, the AddToFlightSchedule(addFlight) doesn't exist when I generated the entity framework edmx based on FlightSchedule.dbo....
cntx.AddToFlightSchedule(addFlight);
Can I know am I supposed to write my own method or it is supposed to be generated by the VS 2013 ?