public bool Update(long id, InvestmentPoco investment) { var isupdated = _repository.Update(id, investment); if (isupdated) { return true; } else { return false; } }
public bool Update(long id, InvestmentPoco investment) { try { _db.Entry(investment).State = System.Data.Entity.EntityState.Modified; _db.SaveChanges(); return true; } catch (Exception) { return false; } }
public void Create(InvestmentPoco investment) { _db.Investments.Add(investment); _db.SaveChanges(); }
public void Create(InvestmentPoco investment) { _repository.Create(investment); }