public override void Add(FormData item) { base.Add(item); if (item.Datas != null) { foreach (var data in item.Datas) { data.FormDataId = item.ID; _formDataItemService.Add(data); } } }
public override ServiceResult <FormData> Add(FormData item) { var result = base.Add(item); if (result.HasViolation) { return(result); } if (item.Datas != null) { foreach (var data in item.Datas) { data.FormDataId = item.ID; _formDataItemService.Add(data); } } return(result); }