Exemple #1
0
 public async Task <ActionResult> Create([Bind(Include = "ReasonsForClosureID,Description")] ReasonsForClosure entity)
 {
     if (ModelState.IsValid)
     {
         await genericRepository.CreateAsync(entity);
     }
     return(RedirectToAction("Index"));
 }
Exemple #2
0
        public async Task <ActionResult> Delete(int id)
        {
            ReasonsForClosure entity = await genericRepository.GetByIDAsync(id);

            if (entity == null)
            {
                return(HttpNotFound());
            }
            return(View(entity));
        }