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); }