Inheritance: System.Data.Objects.DataClasses.EntityObject
 /// <summary>
 /// Deprecated Method for adding a new object to the Documents EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToDocuments(Document document)
 {
     base.AddObject("Documents", document);
 }
 /// <summary>
 /// Create a new Document object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 public static Document CreateDocument(global::System.Int32 id, global::System.String name)
 {
     Document document = new Document();
     document.Id = id;
     document.Name = name;
     return document;
 }
        //------------------------------------------------------------------------------------------
        //------------------------------------------------------------------------------------------
        public Document CreateDocument(string documenName)
        {
            if (this._dbContainer == null)
                throw new EntityManagerException("Nu suntem conectati la baza de date!");

            /*cream un document nou*/
            Document doc = new Document() {
                Name = documenName
            };

            /*adaugam obiectul in baza de date*/
            this._dbContainer.Documents.AddObject(doc);
            this._dbContainer.SaveChanges();

            return doc;
        }