常用方法
常用方法
常用方法
常用方法
public IActionResult GetInvoicesByUserId(int userId) { var invoicesByUserId = _repository.GetInvoicesByUserId(userId); var noInvoicesByUserId = !invoicesByUserId.Any(); if (noInvoicesByUserId) { return(NotFound("There are currently no orders for this user.")); } return(Ok(invoicesByUserId)); }