这是一个叫做AutoMapper的插件,主要功能是让两个类的内容进行映射,最常见的例子就是EF查询出的内容映射到一个实体类上去然后返回这个实体类例如: Mapper.CreateMap(); 如果这时出现 Missing map from Nullable`1 to String. Create using Mapper.CreateMap. 说明两个类的类型不一致,所以必须需要两个类的所有字段定义的类型都保持一致并且名称也要一致才能够避免…
有时候在提交的时候,中间提交出错,导致有文件被lock,所以会报下面的错误: fatal: Unable to create ‘/msg/.git/index.lock’: File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is…
在做一个ORMapping功能的时候发现,Convert.ChangeType不能处理nullable类型,比如int?. 解决办法也很简单,贴出完整的代码(大部分代码来自网络),注意下面代码没经过完整测试,不要直接用在项目里: public delegate void SetValue<T>(T value); public static class ORMapping<T> where T : class, new() { private static De…
https://www.cnblogs.com/patrickyu/p/3211115.html 在做一个ORMapping功能的时候发现,Convert.ChangeType不能处理nullable类型,比如int?. 解决办法也很简单,贴出完整的代码(大部分代码来自网络),注意下面代码没经过完整测试,不要直接用在项目里: public delegate void SetValue<T>(T value); public static class ORMapping<T> whe…
打开网页报错: Ambiguous mapping. Cannot map 'handController' method public com.smallchill.core.toolbox.ajax.AjaxResult com.smallchill.smtlamp.controller.HandController.AC2off(java.lang.String) to {[/hand/AC1off]}: There is already 'handController' bean me…
一个好友的国外VPS由于操作不当,结果装软件的时候总是提示dpkg: warning: files list file for package `*****' missing, assuming package has no files currently installed,导致无法安装任何软件,结果百度+Google了好多教程,最后找到的解决办法如下: #!/bin/bash set -e # Clean out /var/cache/apt/archives apt-get clean #…
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; class test { { Console.WriteLine("1:__" + "Method调用成功!"); } { Console.WriteLine("2:__" + str); } { string classNam…