public ActionResult Create(VyasaPuja vyasapuja)
        {
            if (ModelState.IsValid)
            {
                db.VyasaPujas.Add(vyasapuja);
                vyasapuja.AlphabetFirstLetter = vyasapuja.FirstName.Substring(0, 1);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(vyasapuja);
        }
        // POST api/VyasaPujaAPI
        public HttpResponseMessage PostVyasaPuja(VyasaPuja vyasapuja)
        {
            if (ModelState.IsValid)
            {
                db.VyasaPujas.Add(vyasapuja);
                db.SaveChanges();

                HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, vyasapuja);
                response.Headers.Location = new Uri(Url.Link("DefaultApi", new { id = vyasapuja.Vyasapujaid }));
                return response;
            }
            else
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }
        }
 public ActionResult Edit(VyasaPuja vyasapuja)
 {
     if (ModelState.IsValid)
     {
         vyasapuja.AlphabetFirstLetter = vyasapuja.FirstName.Substring(0, 1);
         db.Entry(vyasapuja).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(vyasapuja);
 }
        // PUT api/VyasaPujaAPI/5
        public HttpResponseMessage PutVyasaPuja(int id, VyasaPuja vyasapuja)
        {
            if (!ModelState.IsValid)
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }

            if (id != vyasapuja.Vyasapujaid)
            {
                return Request.CreateResponse(HttpStatusCode.BadRequest);
            }

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

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException ex)
            {
                return Request.CreateErrorResponse(HttpStatusCode.NotFound, ex);
            }

            return Request.CreateResponse(HttpStatusCode.OK);
        }