public IHttpActionResult PutLeadStatusTrack(int id, LeadStatusTrack leadStatusTrack)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != leadStatusTrack.LeadStatusTrackID)
            {
                return(BadRequest());
            }

            db.Entry(leadStatusTrack).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!LeadStatusTrackExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult GetLeadStatusTrack(int id)
        {
            LeadStatusTrack leadStatusTrack = db.LeadStatusTracks.Find(id);

            if (leadStatusTrack == null)
            {
                return(NotFound());
            }

            return(Ok(leadStatusTrack));
        }
        public IHttpActionResult PostLeadStatusTrack(LeadStatusTrack leadStatusTrack)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.LeadStatusTracks.Add(leadStatusTrack);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = leadStatusTrack.LeadStatusTrackID }, leadStatusTrack));
        }
        public IHttpActionResult DeleteLeadStatusTrack(int id)
        {
            LeadStatusTrack leadStatusTrack = db.LeadStatusTracks.Find(id);

            if (leadStatusTrack == null)
            {
                return(NotFound());
            }

            db.LeadStatusTracks.Remove(leadStatusTrack);
            db.SaveChanges();

            return(Ok(leadStatusTrack));
        }