public void Create(TopMedia model) { DB_Service.Add<TopMedia>(model); DB_Service.Commit(); }
public void Delete(TopMedia model) { var target = Find(model.ID); DB_Service.Remove<TopMedia>(target); DB_Service.Commit(); }
public void Update(TopMedia model) { var target = Find(model.ID); DB_Service.Attach<TopMedia>(target); target.TopTime = model.TopTime; target.MemberID = model.MemberID; target.IsByCategory = model.IsByCategory; target.ProvinceCode = model.ProvinceCode; target.CityCode = model.CityCode; target.IsByChildCategory = model.IsByChildCategory; target.IsQuanGuo = model.IsQuanGuo; target.PCategoryCode = model.PCategoryCode; target.MediaID = model.MediaID; DB_Service.Commit(); }