Last post Jun 13, 2018 02:07 PM by email@example.com
Jun 13, 2018 10:17 AMfirstname.lastname@example.org|LINK
i created new web api 2 project using .net 4.5.
i have included EF of Database first concept then created a contoller and it generated below lines automatically.
in tlkTitles table there is a column called isActive, i want to filter when isAcitve=1, may i know how do i customize the controller?
// GET: api/GettlkpTitles
public IQueryable<tlkpTitle> GettlkpTitles()
Jun 13, 2018 02:07 PMemail@example.com|LINK
i found the solution by the following way
// GET: api/GettlkpActiveTitle
public IOrderedQueryable GettlkpActiveTitle()
return from x in db.tlkpTitles where x.isDeleted == false orderby x.name ascending select x;