public WhoreModel(W***e entity)
        {
            Entity = entity;

            Id           = entity.Id;
            FirstName    = entity.FirstName;
            LastName     = entity.LastName;
            Age          = entity.Age;
            PricePerHour = entity.PricePerHour;
            Pimp         = entity.Pimp;
        }
Beispiel #2
0
 public ActionResult Create(W***e w***e)
 {
     try
     {
         // INSERTADO METODO ADD A NUESTRO CONTROLADOR
         if (ModelState.IsValid)
         {
             db.W****s.Add(w***e);
             db.SaveChanges();
             return(RedirectToAction("Index"));
         }
         return(View(w***e));
     }
     catch
     {
         return(View(w***e));
     }
 }
Beispiel #3
0
        public ActionResult Edit(int id, W***e w***e)
        {
            try
            {
                //TODO CODIGO PARA EDITAR
                if (ModelState.IsValid)
                {
                    db.Entry(w***e).State = EntityState.Modified;
                    db.SaveChanges();

                    return(RedirectToAction("Index"));
                }

                return(View(w***e));
            }
            catch {
                return(View(w***e));
            }
        }
Beispiel #4
0
 public ActionResult Delete(int id, W***e w***e)
 {
     try
     {
         // TODO: Add delete logic here
         if (ModelState.IsValid)
         {
             w***e = db.W****s.Find(id);
             if (w***e == null)
             {
                 return(HttpNotFound());
             }
             db.W****s.Remove(w***e);
             db.SaveChanges();
             return(RedirectToAction("Index"));
         }
         return(View(w***e));
     }
     catch
     {
         return(View(w***e));
     }
 }