.net Core连接MongoDB数据库的步骤详解(2)

@model MongoCore.Models.Province @{ ViewData["Title"] = "Insert"; } <h2>新增</h2> <div> <div> <form asp-action="Insert"> <div asp-validation-summary="ModelOnly"></div> <input type="hidden" asp-for="ProvinceID" /> <div> <label>学校名称</label> <input /> </div> <div> <label>成立年份</label> <input /> </div> <div> <input type="submit" value="保 存" /> </div> </form> </div> </div>

然后添加学校,我添加了两所学校,在MongoDB里可以看到数据

.net Core连接MongoDB数据库的步骤详解

总结

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,如果有疑问大家可以留言交流,谢谢大家对脚本之家的支持。

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wdpyzp.html