public ActionResult Create()
 {
     EmployeDesc desc = new EmployeDesc()
     {
         Employe = new Employe()
         {
             UID = Guid.NewGuid()
         }
     };
     ViewBag.Languages = m_db.Languages;
     return View(desc);
 }
 public ActionResult Add(byte id)
 {
     ViewBag.Languages = m_db.Languages;
     Employe c = new Employe()
     {
         Id = id
     };
     EmployeDesc model = new EmployeDesc()
     {
         Employe = c
     };
     return View(model);
 }
 public ActionResult Add(EmployeDesc item)
 {
     try
     {
         item.Employe = m_db.Employes.Find(item.Employe.Id);
         item.Language = m_db.Languages.Find(item.Language.Id);
         m_db.EmployeDescs.Add(item);
         m_db.SaveChanges();
         return RedirectToAction("Details", "Employe", new { id = item.Employe.Id });
     }
     catch (Exception ex)
     {
         ModelState.AddModelError("", ex.Message);
         ViewBag.Languages = m_db.Languages;
         return View(item);
     }
 }
 public ActionResult Create(EmployeDesc item,string birthDate)
 {
     try
     {
         m_db.Employes.Add(item.Employe);
         m_db.SaveChanges();
         item.Language = m_db.Languages.Find(item.Language.Id);
         item.Employe = m_db.Employes.First(p => item.Employe.UID.Equals(p.UID)); ;
         DateTime dt;
         if (DateTime.TryParse(birthDate, System.Globalization.CultureInfo.GetCultureInfo("en-GB"), System.Globalization.DateTimeStyles.AssumeLocal, out dt))
             item.Employe.BirthDate = dt;
         m_db.EmployeDescs.Add(item);
         m_db.SaveChanges();
         return RedirectToAction("Details", "Employe", new { id = item.Employe.Id });
     }
     catch (Exception ex)
     {
         ModelState.AddModelError("", ex.Message);
         ViewBag.Languages = m_db.Languages;
         return View(item);
     }
 }
 public ActionResult Edit(EmployeDesc item)
 {
     try
     {
         m_db.Entry(item).State = System.Data.Entity.EntityState.Modified;
         m_db.SaveChanges();
         return RedirectToAction("Details", "Employe", new { id = item.Employe.Id });
     }
     catch (Exception ex)
     {
         ModelState.AddModelError("", ex.Message);
         return View(item);
     }
 }