public ObjectResult GetTimeLine(Guid id) { try { if (Guid.Empty == id) { throw new ArgumentException("Id inválido"); } return(Ok(_app.Get(p => p.AuthorId == id))); } catch (Exception ex) { return(BadRequest(new { message = ex.Message })); } }
public IEnumerable <Post> Get() { return(_app.Get(x => x.Active)); }