// 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(); }
/// <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; }
// Default contructor public AreaModel() { this.IsNewItem = true; this._area = new Area(); }
/// <summary> /// Deprecated Method for adding a new object to the Area EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToArea(Area area) { base.AddObject("Area", area); }
// Delete a existed Area public void DeleteArea(Area _area) { unitOfWork.Delete<Area>(_area); }
// Add a new Area public Area AddArea(Area _area) { unitOfWork.Add<Area>(_area); return _area; }
// Update a existed Area public Area UpdateArea(Area _area) { unitOfWork.Update<Area>(_area); return _area; }
// Refresh an existed Area public Area RefeshArea(Area _area) { unitOfWork.Refresh<Area>(_area); return _area; }