FirstOrDefault and other methods are not working in LINQ

C#

using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using practical.Models;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;

namespace practical.Controllers;

public class CustomerController : Controller
{
    private readonly ApplicationDbContext _context;
    public CustomerController(ApplicationDbContext context)
    {
        _context = context;
    }



    public IActionResult Index()
    {
        return View();
    }

    public IActionResult CustomerRegister()
    {

        return View();
    }
    [HttpPost]
    public IActionResult CustomerRegister(customer customer)
    {
        _context.Add(customer);
        _context.SaveChanges();
        return RedirectToAction("CustomerLogin");
    }
    public IActionResult CustomerLogin()
    {
        return View();

    }
    [HttpPost]
    public IActionResult customerLogin(string Customer_email, string Customer_password)
    {
        var row = ;
        return RedirectToAction("Index");
    }

}
Was this page helpful?