public bool Register(UserDTO user)
        {
            var userExist = _uow.Users.SingleOrDefault(p => p.Email == user.Email);

            if (userExist == null)
            {
                var entity = user.Map();
                entity.Password = entity.Password.getSHA1();
                _uow.Users.Add(entity);
                _uow.Save();

                var permission = _uow.Permissions.Single(p => p.Value == (int)PermissionType.User && p.Deleted == false);
                UserPermission userPermission = new UserPermission
                {
                    IdUser = entity.Id,
                    IdPermission = permission.Id,
                    LastModifyDate = DateTime.Now,
                };
                _uow.UserPermissions.Add(userPermission);
                _uow.Save();

                return false;
            }
            else
            {
                return true;
            }
        }
        public static UserPermission Map(this UserPermissionDTO source)
        {
            var target = new UserPermission();

            target.Id = source.Id;
            target.IdPermission = source.IdPermission;
            target.IdUser = source.IdUser;
            target.LastModifyDate = source.LastModifyDate;

            return target;
        }