public async Task <IHttpActionResult> GettXrefUserSNPProbesSNPAvailability(int id)
        {
            tXrefUserSNPProbesSNPAvailability tXrefUserSNPProbesSNPAvailability = await db.tXrefUserSNPProbesSNPAvailabilities.FindAsync(id);

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

            return(Ok(tXrefUserSNPProbesSNPAvailability));
        }
        public async Task <IHttpActionResult> PosttXrefUserSNPProbesSNPAvailability(tXrefUserSNPProbesSNPAvailability tXrefUserSNPProbesSNPAvailability)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.tXrefUserSNPProbesSNPAvailabilities.Add(tXrefUserSNPProbesSNPAvailability);
            await db.SaveChangesAsync();

            return(CreatedAtRoute("DefaultApi", new { id = tXrefUserSNPProbesSNPAvailability.ID }, tXrefUserSNPProbesSNPAvailability));
        }
        public async Task <IHttpActionResult> DeletetXrefUserSNPProbesSNPAvailability(int id)
        {
            tXrefUserSNPProbesSNPAvailability tXrefUserSNPProbesSNPAvailability = await db.tXrefUserSNPProbesSNPAvailabilities.FindAsync(id);

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

            db.tXrefUserSNPProbesSNPAvailabilities.Remove(tXrefUserSNPProbesSNPAvailability);
            await db.SaveChangesAsync();

            return(Ok(tXrefUserSNPProbesSNPAvailability));
        }
        public async Task <IHttpActionResult> PuttXrefUserSNPProbesSNPAvailability(int id, tXrefUserSNPProbesSNPAvailability tXrefUserSNPProbesSNPAvailability)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != tXrefUserSNPProbesSNPAvailability.ID)
            {
                return(BadRequest());
            }

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

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!tXrefUserSNPProbesSNPAvailabilityExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }