public List<BAIVIET> SelectBAIVIETsAll()
        {
            List<BAIVIET> list = new List<BAIVIET>();
            using (LinQDataContext db = new LinQDataContext(global::DAOAuction.Properties.Settings.Default.webdoantruongConnectionString))
            {
                ISingleResult<BAIVIET_getallResult> lp = db.BAIVIET_getall();
                foreach (BAIVIET_getallResult BAIVIET in lp)
                {
                    BAIVIET var1 = new BAIVIET();
                    var1.MaBaiViet = BAIVIET.MaBaiViet;
                    var1.TieuDe = BAIVIET.TieuDe;
                    var1.NoiDung = BAIVIET.NoiDung;
                    var1.MaLoaiBaiViet = BAIVIET.MaLoaiBaiViet;
                    var1.NgayDang = BAIVIET.NgayDang;
                    var1.HinhAnh = BAIVIET.HinhAnh;
                    var1.TomTat = BAIVIET.TieuDe;
                    if (BAIVIET.CapNhat != null)
                        var1.CapNhat = (DateTime)BAIVIET.CapNhat;
                    list.Add(var1);
                }
                try
                {
                    // Save the changes.
                    db.SubmitChanges();
                }
                // Detect concurrency conflicts.
                catch (ChangeConflictException)
                {
                    // Resolve conflicts.
                    db.ChangeConflicts.ResolveAll(RefreshMode.KeepChanges);
                }
            }

            return list;
        }