Ejemplo n.º 1
0
        public HttpResponseMessage ValidateProductBatch(PurchaseServiceViewModel purchaseServiceViewModel)
        {
            //Attch to original Db table using Mapper
            var purchase = PurchaseMapper.Attach(purchaseServiceViewModel);

            _purchaseService.Add(purchase);
            _purchaseService.SaveChanges();
            return(Request.CreateResponse(HttpStatusCode.OK, "Saved successfully."));
        }
Ejemplo n.º 2
0
        public ActionResult Save(PurchaseServiceViewModel purchaseServiceViewModel)
        {
            //Attch to original Db table using Mapper
            var purchase = PurchaseMapper.Attach(purchaseServiceViewModel);

            _purchaseService.Add(purchase);

            return(View());
        }