Ejemplo n.º 1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Module EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToModule(Module module)
 {
     base.AddObject("Module", module);
 }
Ejemplo n.º 2
0
 public void InsertModuleDto(ModuleDto module)
 {
     Module moduleEntity=new Module();
     MapDtoToEntity(module,moduleEntity);
     if ((moduleEntity.EntityState != EntityState.Detached))
     {
         this.ObjectContext.ObjectStateManager.ChangeObjectState(module, EntityState.Added);
     }
     else
     {
         this.ObjectContext.Module.AddObject(moduleEntity);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Create a new Module object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="displayName">Initial value of the DisplayName property.</param>
 /// <param name="fileName">Initial value of the FileName property.</param>
 /// <param name="enabled">Initial value of the Enabled property.</param>
 /// <param name="version">Initial value of the Version property.</param>
 /// <param name="hash">Initial value of the Hash property.</param>
 public static Module CreateModule(global::System.Int32 id, global::System.String name, global::System.String displayName, global::System.String fileName, global::System.Boolean enabled, global::System.String version, global::System.String hash)
 {
     Module module = new Module();
     module.Id = id;
     module.Name = name;
     module.DisplayName = displayName;
     module.FileName = fileName;
     module.Enabled = enabled;
     module.Version = version;
     module.Hash = hash;
     return module;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Maps the dto to entity.
 /// </summary>
 /// <param name="moduleDto">The module dto.</param>
 /// <param name="module">The module.</param>
 private void MapDtoToEntity(ModuleDto moduleDto, Module module)
 {
     module.Name = moduleDto.Name;
     module.FileName = moduleDto.FileName;
     module.Hash = moduleDto.Hash;
     module.Version = moduleDto.Version;
     module.Enabled = moduleDto.Enabled;
     module.DisplayName = moduleDto.DisplayName;
 }