public RankViewModel(Rank rank) { if (rank == null) { throw new ArgumentNullException("rank"); } this.Model = rank; }
/// <summary> /// Create a new Rank object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="code">Initial value of the Code property.</param> /// <param name="name">Initial value of the Name property.</param> /// <param name="sourceId">Initial value of the SourceId property.</param> public static Rank CreateRank(global::System.Guid id, global::System.String code, global::System.String name, global::System.Int32 sourceId) { Rank rank = new Rank(); rank.Id = id; rank.Code = code; rank.Name = name; rank.SourceId = sourceId; return rank; }
/// <summary> /// Deprecated Method for adding a new object to the Ranks EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToRanks(Rank rank) { base.AddObject("Ranks", rank); }