/// <summary>
 /// Create a new UserRole object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 public static UserRole CreateUserRole(global::System.Int32 id, global::System.String name)
 {
     UserRole userRole = new UserRole();
     userRole.Id = id;
     userRole.Name = name;
     return userRole;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the UserRole EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToUserRole(UserRole userRole)
 {
     base.AddObject("UserRole", userRole);
 }
예제 #3
0
        public void TestUserRoleModel()
        {
            var role = new UserRole
            {
                Id = 1,
                Name = "firstName",
            };

            var dto = UserRoleDto.Create(role);

            Assert.AreEqual(role.Id, dto.Id);
            Assert.AreEqual(role.Name, dto.Name);
        }