public static bool Insert(SqlConnection connection, SE_MDRecommendConfigModel model) { using (IDbConnection conn = connection) { string sql = @" INSERT INTO Tuhu_Groupon.dbo.SE_MDRecommendConfig ( PartId, Type, VehicleType, IsDisable, Products, CreateTime ) VALUES ( @PartId, @Type, @VehicleType, @IsDisable, @Products, @CreateTime )" ; return(conn.Execute(sql, model) > 0); } }
public static bool Update(SE_MDRecommendConfigModel model) { try { return(SE_MDRecommendConfigDAL.Update(ProcessConnection.OpenTuhu_Groupon, model)); } catch (Exception ex) { throw ex; } }
public static bool Update(SqlConnection connection, SE_MDRecommendConfigModel model) { using (IDbConnection conn = connection) { string sql = @" UPDATE Tuhu_Groupon.dbo.SE_MDRecommendConfig SET PartId = @PartId, Type = @Type, VehicleType = @VehicleType, IsDisable = @IsDisable, Products = @Products, CreateTime = @CreateTime WHERE Id = @Id " ; return(conn.Execute(sql, model) > 0); } }