ado 数据库提交为Null

new SqlParameter("@email",System.Data.SqlDbType.VarChar,100){Value=model.Email==null?DBNull.Value:(object)model.Email}




model.Email = reader.IsDBNull(3) ? null : reader.GetString(3);

 

posted @ 2015-09-16 08:04  刀小爱  阅读(174)  评论(0编辑  收藏  举报