I got a line of code like so:
ProjectClass pricing = db.Data.Where(model => model.collection == “aaa”);
but I get this error:
Cannot implicitly convert type 'System.Linq.IQueryable<ProjectName.Models.ProjectClass>' to 'ProjectName.Models.ProjectClass'. An explicit conversion exists (are you missing a cast?)
What Am I doing wrong?
Here is my ProjectClass
public class ProjectClass
{
[Key]
public int id { get; set; }
[DisplayName("Design")]
public string name { get; set; }
[DisplayName("Price")]
[DisplayFormat(DataFormatString = "{0:n0}")]
public int basePrice { get; set; }
[DisplayName("Size")]
public int sqft { get; set; }
[DisplayName("Collection")]
public string collection { get; set; }
[DisplayName("Hidden")]
public bool hidden { get; set; }
}