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

            }
            else
            {
                return false;
            }
        }
コード例 #2
0
        public bool UpdateInvestmentType(long id, InvestmentTypePoco investmenttype)
        {
            try
            {
                _db.Entry(investmenttype).State = System.Data.Entity.EntityState.Modified;
                _db.SaveChanges();
                return true;

            }
            catch (Exception)
            {

                return false;
            }
        }
コード例 #3
0
 public void CreateInvestmentType(InvestmentTypePoco investmenttype)
 {
     _db.InvestmentTypes.Add(investmenttype);
     _db.SaveChanges();
 }
コード例 #4
0
ファイル: InvestmentLogic.cs プロジェクト: johnhinz/Investor
 public void CreateInvestmentType(InvestmentTypePoco investmenttype)
 {
     _repository.CreateInvestmentType(investmenttype);
 }