public async Task <IHttpActionResult> PutPayoutProcess(int id, PayoutProcess payoutProcess)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != payoutProcess.Id)
            {
                return(BadRequest());
            }

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public async Task <IHttpActionResult> GetPayoutProcess(int id)
        {
            PayoutProcess payoutProcess = await db.PayoutProcesses.FindAsync(id);

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

            return(Ok(payoutProcess));
        }
        public async Task <IHttpActionResult> PostPayoutProcess(PayoutProcess payoutProcess)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.PayoutProcesses.Add(payoutProcess);
            await db.SaveChangesAsync();

            return(CreatedAtRoute("DefaultApi", new { id = payoutProcess.Id }, payoutProcess));
        }
        public async Task <IHttpActionResult> DeletePayoutProcess(int id)
        {
            PayoutProcess payoutProcess = await db.PayoutProcesses.FindAsync(id);

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

            db.PayoutProcesses.Remove(payoutProcess);
            await db.SaveChangesAsync();

            return(Ok(payoutProcess));
        }