public IHttpActionResult PutView_Supplier_Ledger(int id, View_Supplier_Ledger view_Supplier_Ledger)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

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

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

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

            return StatusCode(HttpStatusCode.NoContent);
        }
        public IHttpActionResult PostView_Supplier_Ledger(View_Supplier_Ledger view_Supplier_Ledger)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            db.View_Supplier_Ledger.Add(view_Supplier_Ledger);

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateException)
            {
                if (View_Supplier_LedgerExists(view_Supplier_Ledger.Id))
                {
                    return Conflict();
                }
                else
                {
                    throw;
                }
            }

            return CreatedAtRoute("DefaultApi", new { id = view_Supplier_Ledger.Id }, view_Supplier_Ledger);
        }