public int UpdateUserType(DAL.Entity.UserType UserType)
 {
     try
     {
         _IUserTypeRepository.Update(UserType);
         return(_IUserTypeRepository.Save());
     }
     catch (Exception exception)
     {
         exception.Log();
         return(0);
     }
 }
예제 #2
0
        public void Update_WasUserTypeUpdated_ActualEqualsExpectedData()
        {
            var expectedUserType = new UserType
            {
                ID          = 1,
                Description = "UpdatedUserType"
            };
            UserType actualUserType;

            using (var userTypeRepo = new UserTypeRepository(new brothershipEntities(ConnectionStrings.TEST_CONNECTION_STRING_NAME)))
            {
                userTypeRepo.Update(expectedUserType);
                actualUserType = userTypeRepo.GetById(expectedUserType.ID);
            }

            AssertUserTypesEqual(expectedUserType, actualUserType);
        }
예제 #3
0
 public Response Put([FromBody] UserTypes value)
 {
     return(repo.Update(value));
 }