查询大数据表的效率对比:Linq to SQL、Entity Framework、企业(7)
来源:未知 责任编辑:责任编辑 发表时间:2014-02-18 03:26 点击:次
db.AddInParameter(dbCommand, "ID", DbType.String, i);
db.AddInParameter(dbCommand, "Name", DbType.String, model.Name);
db.AddInParameter(dbCommand, "Country", DbType.String, model.Country);
db.AddInParameter(dbCommand, "Province", DbType.String, model.Province);
db.AddInParameter(dbCommand, "City", DbType.String, model.City);
db.AddInParameter(dbCommand, "Address", DbType.String, model.Address);
db.AddInParameter(dbCommand, "ZipCode", DbType.String, model.ZipCode);
db.AddInParameter(dbCommand, "Phone", DbType.String, model.Phone);
db.AddInParameter(dbCommand, "IsApproved", DbType.Boolean, model.IsApproved);
return db.ExecuteNonQuery(dbCommand);
}
Database db;
DbCommand dbCommand;
public DataSet select()
{
try
{
db = DatabaseFactory.CreateDatabase();
dbCommand = db.GetStoredProcCommand("SelectSchoolsAll");
return db.ExecuteDataSet(dbCommand);
}
finally
{
dbCommand.Connection.Close();
dbCommand.Connection.Dispose();
}
}
public DataSet select1()
{
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>