public void TableDelete([FromBody] DemoPluginRawData request) { var deleteRawData = request; if (deleteRawData != null) { if (SampleDatas.Any(d => d.Id == deleteRawData.Id)) { SampleDatas.Remove(SampleDatas.First(d => d.Id == deleteRawData.Id)); } } }
public void TableUpdate([FromBody] DemoPluginRawData request) { var updateRawData = request; if (updateRawData != null) { var dbRawData = SampleDatas.FirstOrDefault(d => d.Id == updateRawData.Id); if (dbRawData != null) { dbRawData.Name = updateRawData.Name; dbRawData.Type = updateRawData.Type; } } }