public async Task <IActionResult> GetNotes([FromQuery] string title, [FromQuery] string label, [FromQuery] bool?isPinned)
        {
            {
                if (!ModelState.IsValid)
                {
                    return(BadRequest(ModelState));
                }
                var notes = await _noteService.GetNotes(title, label, isPinned);

                //if (notes.Count == 0)
                //{
                //    return NotFound();
                //}
                return(Ok(notes));
            }
        }
コード例 #2
0
 public IActionResult GetNotes()
 {
     return(Ok(_notesServices.GetNotes()));
 }