コード例 #1
0
        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));
                }
            }
        }
コード例 #2
0
        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;
                }
            }
        }