liter
New member
- Joined
- Sep 2, 2021
- Messages
- 1
- Programming Experience
- 1-3
C#:
namespace Vectigal.Invoice.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class InvoicesController : ControllerBase
{
private readonly InvoiceContext _context;
public InvoicesController(InvoiceContext context)
{
_context = context;
}
// GET: api/Invoices
[HttpGet]
public async Task<ActionResult<IEnumerable<Invoice>>> GetInvoices()
{
return await _context.Invoices.ToListAsync();
}
error CS0118: 'Invoice' is a namespace but is used like a type
Last edited by a moderator: