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;
 }
Example #6
0
 public Sach(SACH sach, NXB nxb, LINHVUC linhvuc)
     : this(sach, nxb)
 {
     LinhVucSach = new LinhVuc(linhvuc);
 }
Example #7
0
 public Sach(SACH sach, LINHVUC linhvuc)
     : this(sach)
 {
     LinhVucSach = new LinhVuc(linhvuc);
 }