Exemplo n.º 1
0
 // Default contructor that set entity to field
 public AreaModel(Area area)
 {
     this._area = area;
     this._id = area.Id;
     this._name_area = area.NameArea;
     this._originalArea = area.DeepClone();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new Area object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 public static Area CreateArea(global::System.Guid id)
 {
     Area area = new Area();
     area.Id = id;
     return area;
 }
Exemplo n.º 3
0
 // Default contructor
 public AreaModel()
 {
     this.IsNewItem = true;
     this._area = new Area();
 }
Exemplo n.º 4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Area EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToArea(Area area)
 {
     base.AddObject("Area", area);
 }
Exemplo n.º 5
0
 // Delete a existed Area
 public void DeleteArea(Area _area)
 {
     unitOfWork.Delete<Area>(_area);
 }
Exemplo n.º 6
0
 // Add a new Area
 public Area AddArea(Area _area)
 {
     unitOfWork.Add<Area>(_area);
     return _area;
 }
Exemplo n.º 7
0
 // Update a existed Area
 public Area UpdateArea(Area _area)
 {
     unitOfWork.Update<Area>(_area);
     return _area;
 }
Exemplo n.º 8
0
 // Refresh an existed Area
 public Area RefeshArea(Area _area)
 {
     unitOfWork.Refresh<Area>(_area);
     return _area;
 }