示例#1
0
        public void DeleteInvestmentType(long id)
        {
            InvestmentTypePoco p = _db.InvestmentTypes.Find(id);

            _db.InvestmentTypes.Remove(p);
            _db.SaveChanges();
        }
示例#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 bool UpdateInvestmentType(long id, InvestmentTypePoco investmenttype)
        {
            var isupdated = _repository.UpdateInvestmentType(id, investmenttype);

            if (isupdated)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#4
0
        public HttpResponseMessage UpdateInvestmentType([FromBody] InvestmentTypePoco investmenttype)
        {
            var isUpdated = _logic.UpdateInvestmentType(investmenttype.Id, investmenttype);

            if (isUpdated == true)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, investmenttype));
            }
            else
            {
                return(Request.CreateResponse(HttpStatusCode.NotModified, investmenttype));
            }
        }
示例#5
0
 public void CreateInvestmentType(InvestmentTypePoco investmenttype)
 {
     _db.InvestmentTypes.Add(investmenttype);
     _db.SaveChanges();
 }
示例#6
0
 public void CreateInvestmentType(InvestmentTypePoco investmenttype)
 {
     _repository.CreateInvestmentType(investmenttype);
 }
示例#7
0
 public HttpResponseMessage CreateInvestmentType([FromBody] InvestmentTypePoco investmenttype)
 {
     _logic.CreateInvestmentType(investmenttype);
     return(Request.CreateResponse(HttpStatusCode.OK));
 }