public async Task <bool> CreateTraSpend(SpendData json) { SpendModel spend = new SpendModel(this._context); //var spendObj = JsonSerializer.Deserialize<SpendData>(json); // JSONからオブジェクトにデシリアライズ //bool result = await spend.InsertTraSpend(spendObj); bool result = await spend.InsertTraSpend(json); return(result); }
public async Task <bool> UpdateTraSpend([FromBody] string json) { SpendModel spend = new SpendModel(this._context); var spendObj = JsonSerializer.Deserialize <SpendData>(json); // JSONからオブジェクトにデシリアライズ bool result = await spend.UpdateTraSpend(spendObj); return(result); }
public async Task <ActionResult <IEnumerable <Mst_Spend> > > GetTraIncome() { SpendModel spend = new SpendModel(this._context); return(await spend.GetMst_SpendAsync()); }
public async Task <ActionResult <IEnumerable <Tra_Spending> > > GetTraSpend() { SpendModel spend = new SpendModel(this._context); return(await spend.GetSpendAsync()); }