1

I, am using asp.net core with entity framework. When I, add the entity to the db context file only tables has been added to the context.cs file. Views and store procedure are not added to the context file.

Below is the database view

 data base view

Here is the DbContext.cs file code

    public partial class FalconContext : DbContext
    {
        public virtual DbSet<Category> Category { get; set; }
        public virtual DbSet<CategoryDelete> CategoryDelete { get; set; }
        public virtual DbSet<Colors> Colors { get; set; }
        public virtual DbSet<Currency> Currency { get; set; }
        public virtual DbSet<Gender> Gender { get; set; }
        public virtual DbSet<LowerClothSizes> LowerClothSizes { get; set; }
        public virtual DbSet<Product> Product { get; set; }
        public virtual DbSet<ShoesSize> ShoesSize { get; set; }
        public virtual DbSet<Sizes> Sizes { get; set; }
        public virtual DbSet<SubCategoryOne> SubCategoryOne { get; set; }
        public virtual DbSet<SubCategoryOneDelete> SubCategoryOneDelete { get; set; }
        public virtual DbSet<SubCategoryTwo> SubCategoryTwo { get; set; }
        public virtual DbSet<UpperClothSizes> UpperClothSizes { get; set; }
        public virtual DbSet<UserFalcon> UserFalcon { get; set; }
        public virtual DbSet<Vendor> Vendor { get; set; }

        // Unable to generate entity type for table 'dbo.Product_Description'. Please see the warning messages.

        public FalconContext(DbContextOptions<FalconContext> options)
         : base(options)
        { }
}

I, did some research and found that till now view & store procedure are not been supported in the asp.net core. But all the answer I found is from the older version.

Can anyone let me know if this problem is still exists or is their any solution to the problem.

I, don't want to use ado.net or code first approach to call the view and store procedure

San Jaisy
  • 15,327
  • 34
  • 171
  • 290
  • Nothing has changed from [my question](https://stackoverflow.com/questions/36012616/working-with-sql-views-in-entity-framework-core) about SQL views in EF Core. – Yurii N. Sep 07 '17 at 07:56

0 Answers0