Retail_manager/RMDataManagerLibrary/DataAcccess/InventoryData.cs
s459315 f118635029 Added admin endpoints
Added inventory and sales api endpoints
2022-08-02 19:32:39 +02:00

30 lines
757 B
C#

using RMDataManagerLibrary.Internal.DataAccess;
using RMDataManagerLibrary.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RMDataManagerLibrary.DataAcccess
{
public class InventoryData
{
public List<InventoryModel> GetInventory()
{
SqlDataAccess sql = new SqlDataAccess();
var output = sql.LoadData<InventoryModel, dynamic>("dbo.spInventoryGetAll", new { }, "RMData");
return output;
}
public void SaveInventoryRecord(InventoryModel item)
{
SqlDataAccess sql = new SqlDataAccess();
sql.SaveData("dbo.spInventoryInsert", item, "RMData");
}
}
}