public void DeleteInvestmentType(long id) { InvestmentTypePoco p = _db.InvestmentTypes.Find(id); _db.InvestmentTypes.Remove(p); _db.SaveChanges(); }
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); } }
public bool UpdateInvestmentType(long id, InvestmentTypePoco investmenttype) { var isupdated = _repository.UpdateInvestmentType(id, investmenttype); if (isupdated) { return(true); } else { return(false); } }
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)); } }
public void CreateInvestmentType(InvestmentTypePoco investmenttype) { _db.InvestmentTypes.Add(investmenttype); _db.SaveChanges(); }
public void CreateInvestmentType(InvestmentTypePoco investmenttype) { _repository.CreateInvestmentType(investmenttype); }
public HttpResponseMessage CreateInvestmentType([FromBody] InvestmentTypePoco investmenttype) { _logic.CreateInvestmentType(investmenttype); return(Request.CreateResponse(HttpStatusCode.OK)); }