cannot convert from 'System.Collections.Generic.List' to 'System.Collections.Generic.List' asp.net-web-api entity-framework-6

Question

I want to retrieve all determined columns from the model table as queryable I write some code, and it works.

Severity Code Description Project File Line Suppression State Error CS1503 Argument 1: cannot convert from 'System.Collections.Generic.List' to 'System.Collections.Generic.List'

if you need assistance fixing this issue using best practises:

public IQueryable<DAL.model> GetAllmodels()
    {
        var models = (from d in db.models
                      where (d.Model_Deleted == false)
                      select (
                      new
                      {
                          d.Model_ID,
                          d.Model_Name,
                          d.Model_Image

                      })).AsQueryable();

        return models;
    }
1
0
8/29/2018 11:04:39 AM

Accepted Answer

ZZZ_tmp
1
8/29/2018 11:11:38 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow