public ActionResult Create(Workgroup obj)
 {
     try
     {
         SaveValue(obj);
         return RedirectToAction("Index");
     }
     catch
     {
         return View();
     }
 }
 private void SaveValue(Workgroup obj)
 {
     using (var tran = db.BeginTransaction())
     {
         db.SaveOrUpdate(obj);
         db.Flush();
         tran.Commit();
     }
 }