コード例 #1
0
ファイル: InvestmentLogic.cs プロジェクト: johnhinz/Investor
        public bool Update(long id, InvestmentPoco investment)
        {
            var isupdated = _repository.Update(id, investment);
            if (isupdated)
            {
                return true;

            }
            else
            {
                return false;
            }
        }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
 public void Create(InvestmentPoco investment)
 {
     _db.Investments.Add(investment);
     _db.SaveChanges();
 }
コード例 #4
0
ファイル: InvestmentLogic.cs プロジェクト: johnhinz/Investor
 public void Create(InvestmentPoco investment)
 {
     _repository.Create(investment);
 }