Esempio 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();
 }
Esempio 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;
 }
Esempio n. 3
0
 // Default contructor
 public AreaModel()
 {
     this.IsNewItem = true;
     this._area = new Area();
 }
Esempio 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);
 }
Esempio n. 5
0
 // Delete a existed Area
 public void DeleteArea(Area _area)
 {
     unitOfWork.Delete<Area>(_area);
 }
Esempio n. 6
0
 // Add a new Area
 public Area AddArea(Area _area)
 {
     unitOfWork.Add<Area>(_area);
     return _area;
 }
Esempio n. 7
0
 // Update a existed Area
 public Area UpdateArea(Area _area)
 {
     unitOfWork.Update<Area>(_area);
     return _area;
 }
Esempio n. 8
0
 // Refresh an existed Area
 public Area RefeshArea(Area _area)
 {
     unitOfWork.Refresh<Area>(_area);
     return _area;
 }