add database field database razor page code example

Example: how to insert datatype in asp.net core table

public ActionResult CreateMultiple()
{
    return View();
}

public JsonResult SaveData(string getepassdata)//WebMethod to Save the data  
{
    try
    {
        var serializeData = JsonConvert.DeserializeObject<List<GatePass>>(getepassdata);

        foreach (var data in serializeData)
        {
            db.GatePasses.Add(data);
        }

        db.SaveChanges();
    }
    catch (Exception)
    {
        return Json("fail");
    }

    return Json("success");
}