Retail_manager/RMDataManager/Controllers/SaleController.cs
s459315 f0bea75284 Add Saving Cart to the DB
All the changes necessary to save shopping cart to DB
2022-07-25 17:02:36 +02:00

25 lines
587 B
C#

using Microsoft.AspNet.Identity;
using RMDataManagerLibrary.DataAcccess;
using RMDataManagerLibrary.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace RMDataManager.Controllers
{
[Authorize]
public class SaleController : ApiController
{
public void Post(SaleModel sale)
{
string cashierId = RequestContext.Principal.Identity.GetUserId();
SaleData data = new SaleData();
data.SaveSale(sale, cashierId);
}
}
}