Exemplo n.º 1
0
 public ActionResult Create(FormCollection collection)
 {
     if (ModelState.IsValid)
     {
         officer o = new officer();
         o.name = collection["name"];
         //oc.officers.Add(o);
         //oc.SaveChanges();
       //  or.Add(o);
         _offser.CreateOfficer(o);
         return RedirectToAction("Index");
     }
     else
     {
         return View(oc.officers.ToList());
     }
 }
Exemplo n.º 2
0
 public void CreateOfficer(officer off)
 {
     _IRepository.Add(off);
 }