public Task <int> Save(ItemsDetailEntity itemsDetailEntity, string keyValue, HttpContext context) { if (!string.IsNullOrEmpty(keyValue)) { itemsDetailEntity.AttachModifyInfo(keyValue, context); return(service.UpdateAsync(itemsDetailEntity)); } else { itemsDetailEntity.AttachCreateInfo(context); return(service.InsertAsync(itemsDetailEntity)); } }