Remove two or more itens form a list with predicate

I have a list that returns all status values except the exported one, however, I would like a list that returns all values except the exported and the authorized one (2 Status) // Getting all status except the exported one // GetStarusApontamento is a IEnumerable var listStatus = this._apontamentoAppService.GetStatusApontamento().Where(x=>x != StatusApontamento.Exported).ToList(); How would I do … Read more

How to get specific field(s) from database?

public class UserController : ApiController { UserSampleEntities entities = new UserSampleEntities(); // GET api/<controller> [Route("api/User")] public IEnumerable<user> Get() { { return entities.users; } } } This returns the json with all the entries in the database with all its properties. How do I filter such that I can obtain a json for only specific properties? … Read more