public IHttpActionResult Posttbl_account(tbl_account tbl_account)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.tbl_account.Add(tbl_account);

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateException)
            {
                if (tbl_accountExists(tbl_account.Username))
                {
                    return(Conflict());
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtRoute("DefaultApi", new { id = tbl_account.Username }, tbl_account));
        }
        public IHttpActionResult Puttbl_account(string id, tbl_account tbl_account)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != tbl_account.Username)
            {
                return(BadRequest());
            }

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult Gettbl_account(string id)
        {
            tbl_account tbl_account = db.tbl_account.Find(id);

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

            return(Ok(tbl_account));
        }
        public IHttpActionResult Deletetbl_account(string id)
        {
            tbl_account tbl_account = db.tbl_account.Find(id);

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

            db.tbl_account.Remove(tbl_account);
            db.SaveChanges();

            return(Ok(tbl_account));
        }