public int AddDocType(string docTypeName) { DocType docType= new DocType(); docType.name = docTypeName; Entities.DocTypes.AddObject(docType); Save(); return docType.id; }
/// <summary> /// Create a new DocType object. /// </summary> /// <param name="id">Initial value of the id property.</param> /// <param name="name">Initial value of the name property.</param> public static DocType CreateDocType(global::System.Int32 id, global::System.String name) { DocType docType = new DocType(); docType.id = id; docType.name = name; return docType; }
/// <summary> /// Deprecated Method for adding a new object to the DocTypes EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToDocTypes(DocType docType) { base.AddObject("DocTypes", docType); }