日期:2014-05-20 浏览次数:20955 次
public PlayList SelectByMids(string mids)
{
string sql="select * from Music where Mid in "+mids;
var result = db.ExecuteQuery<Music>(sql);
PlayList pl=new PlayList();
foreach (var item in result)
{
pl.Mid = item.Mid;
pl.Mname = item.Mname;
pl.Sname = item.Sname;
pl.Url = item.Url;
db.PlayList.InsertOnSubmit(pl);
db.SubmitChanges();
}
return pl ;
}
public PlayList SelectByMids(string mids)
{
string sql="select * from Music where Mid in "+mids;
var result = db.ExecuteQuery<Music>(sql);
foreach (var item in result)
{
PlayList pl=new PlayList();
pl.Mid = item.Mid;
pl.Mname = item.Mname;
pl.Sname = item.Sname;
pl.Url = item.Url;
db.PlayList.InsertOnSubmit(pl);
db.SubmitChanges();
}
return pl ;
}