public ActionResult Create(Currency currency)
        {
            if (ModelState.IsValid)
            {
                _unitOfWork.Currencies.Add(currency);
                _unitOfWork.Complete();
                return RedirectToAction("Index");
            }

            return View(currency);
        }
Exemple #2
0
 public void Edit(Currency currency)
 {
     _raisinsDb.Entry(currency).State = EntityState.Modified;
 }
Exemple #3
0
 public void Delete(Currency currency)
 {
     _raisinsDb.Currencies.Remove(currency);
 }
Exemple #4
0
 public void Add(Currency currency)
 {
     _raisinsDb.Currencies.Add(currency);
 }