On this part of the tutorial:
<a class="postlink" href="https://www.aspnetzero.com/Documents/Developing-Step-By-Step-Mvc-Angularjs#changing-getpeople-method">https://www.aspnetzero.com/Documents/De ... ple-method</a>
comes an example using "Include" extension method for bring relation with Phones
var persons = _personRepository
.GetAll()
.Include(p => p.Phones)
.WhereIf(
!input.Filter.IsNullOrEmpty(),
p => p.Name.Contains(input.Filter) ||
p.Surname.Contains(input.Filter) ||
p.EmailAddress.Contains(input.Filter)
)
.OrderBy(p => p.Name)
.ThenBy(p => p.Surname)
.ToList();
I am making a custom application follow that example with Angular 1, Module Zero and Entity Framework, and on one of my AppService files on the Application Layer. I am trying to do the same thing, using the Include extension method, but the problem is that this method is not recognized, there is no "using" that solve this problem, I can't compile. I read that this belong to System.Data.Entity so add this "using" but is not working.
1 Answer(s)
-
0
I figure that is (now obviously) required include Entity Framework Package in Application Project. (where the DTO Resides)
Just open console, set Project default to Application and install Entity Framework
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)