Пример #1
0
        /// <summary>
        /// 真实修改产品替换组
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        protected async Task <IActionResult> _UpdateGroup([FromBody] ProductReplaceGroupEditModel model)
        {
            var mapping = new Func <ProductReplaceGroup, Task <ProductReplaceGroup> >(async(entity) =>
            {
                entity.Name          = model.Name;
                entity.Description   = model.Description;
                entity.DefaultItemId = model.DefaultItemId;
                entity.GroupItemIds  = model.ItemIds;
                //entity.CategoryId = model.CategoryId;
                return(await Task.FromResult(entity));
            });

            return(await _PutRequest(model.Id, mapping));
        }
Пример #2
0
 public async Task <IActionResult> Put([FromBody] ProductReplaceGroupEditModel model)
 {
     return(await _UpdateGroup(model));
 }