示例#1
0
        public TModel Insert(TModel model)
        {
            XElement newElement = EntityToElement(model);

            Guid id = Guid.NewGuid();

            newElement.Attribute(IdName).SetValue(id);
            ContainerElement.Add(newElement);

            TModel newModel = ElementToEntity(newElement);

            return(newModel);
        }