晚上在那里调程序,把mysql.data组件的nuget包进行了更新,前几天好好的程序,开始抛错,跟踪断点发现以下的异常: Unable to connect to any of the specified MySQL hosts. 一开始以为数据库出了错误,去检查数据库状态正常,用Mysql workbench在远程连接也正常.感觉有点奇怪. 又认真看了下,发现这个异常下面还有个提示: INNER EXCEPTION: Sequence contains more than one match…
Adding a model to an ASP.NET Core MVC app在 asp.net core mvc 中添加一个model (模型)2017-3-30 8 分钟阅读时长 本文内容1. Add a data model class添加一个数据模型类2. Scaffolding a controller控制器基架3. Add EF tooling and perform initial migration添加EF工具并做基本迁移4. Test the app测试应用5. Depen…
Adding a controller to a ASP.NET Core MVC app with Visual Studio 在asp.net core mvc 中添加一个控制器 2017-2-28 5 分钟阅读时长 By Rick Anderson The Model-View-Controller (MVC) architectural pattern separates an app into three main components: Model, View, and Contro…
开发环境:win7,vs2017,sqlserver2014 vs上建立一个asp.net core web项目和一个.net core的类库项目DBA 简单起见,在DBA项目中就一个类SqlServerManager: using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; us…