public static int add(LinhVuc linhvuc)
 {
     using (EntitiesDataContext db = new EntitiesDataContext())
     {
         var lv = new LINHVUC();
         lv.ten = linhvuc.TenLinhVuc;
         db.LINHVUCs.InsertOnSubmit(lv);
         db.SubmitChanges();
         return lv.masolinhvuc;
     }
 }
 partial void DeleteLINHVUC(LINHVUC instance);
 partial void UpdateLINHVUC(LINHVUC instance);
 partial void InsertLINHVUC(LINHVUC instance);
 public LinhVuc(LINHVUC linhvuc)
 {
     MaSoLinhVuc = linhvuc.masolinhvuc;
     TenLinhVuc = linhvuc.ten;
     TrangThai = linhvuc.trangthai;
 }
 public Sach(SACH sach, NXB nxb, LINHVUC linhvuc)
     : this(sach, nxb)
 {
     LinhVucSach = new LinhVuc(linhvuc);
 }
 public Sach(SACH sach, LINHVUC linhvuc)
     : this(sach)
 {
     LinhVucSach = new LinhVuc(linhvuc);
 }