| 
				
			 | 
			
			
				
				@@ -1,5 +1,6 @@ 
			 | 
		
		
	
		
			
			| 
				1
			 | 
			
				1
			 | 
			
			
				
				 using Microsoft.AspNetCore.Authorization; 
			 | 
		
		
	
		
			
			| 
				2
			 | 
			
				2
			 | 
			
			
				
				 using Microsoft.AspNetCore.Mvc; 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				3
			 | 
			
			
				
				+using Microsoft.EntityFrameworkCore; 
			 | 
		
		
	
		
			
			| 
				3
			 | 
			
				4
			 | 
			
			
				
				 using System; 
			 | 
		
		
	
		
			
			| 
				4
			 | 
			
				5
			 | 
			
			
				
				 using System.Collections.Generic; 
			 | 
		
		
	
		
			
			| 
				5
			 | 
			
				6
			 | 
			
			
				
				 using System.Drawing.Text; 
			 | 
		
		
	
	
		
			
			| 
				
			 | 
			
			
				
				@@ -195,7 +196,8 @@ namespace UnivateProperties_API.Repository.Users 
			 | 
		
		
	
		
			
			| 
				195
			 | 
			
				196
			 | 
			
			
				
				                 user.PasswordSalt = passwordSalt; 
			 | 
		
		
	
		
			
			| 
				196
			 | 
			
				197
			 | 
			
			
				
				             } 
			 | 
		
		
	
		
			
			| 
				197
			 | 
			
				198
			 | 
			
			
				
				  
			 | 
		
		
	
		
			
			| 
				198
			 | 
			
				
			 | 
			
			
				
				-            _dbContext.Users.Update(user); 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				199
			 | 
			
			
				
				+            //_dbContext.Users.Update(user); 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				200
			 | 
			
			
				
				+            _dbContext.Entry(user).State = EntityState.Modified; 
			 | 
		
		
	
		
			
			| 
				199
			 | 
			
				201
			 | 
			
			
				
				             _dbContext.SaveChanges(); 
			 | 
		
		
	
		
			
			| 
				200
			 | 
			
				202
			 | 
			
			
				
				         } 
			 | 
		
		
	
		
			
			| 
				201
			 | 
			
				203
			 | 
			
			
				
				  
			 | 
		
		
	
	
		
			
			| 
				
			 | 
			
			
				
				@@ -273,7 +275,8 @@ namespace UnivateProperties_API.Repository.Users 
			 | 
		
		
	
		
			
			| 
				273
			 | 
			
				275
			 | 
			
			
				
				             user.PasswordSalt = passwordSalt; 
			 | 
		
		
	
		
			
			| 
				274
			 | 
			
				276
			 | 
			
			
				
				             user.FPToken = ""; 
			 | 
		
		
	
		
			
			| 
				275
			 | 
			
				277
			 | 
			
			
				
				  
			 | 
		
		
	
		
			
			| 
				276
			 | 
			
				
			 | 
			
			
				
				-            _dbContext.Users.Update(user); 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				278
			 | 
			
			
				
				+            //_dbContext.Users.Update(user); 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				279
			 | 
			
			
				
				+            _dbContext.Entry(user).State = EntityState.Modified; 
			 | 
		
		
	
		
			
			| 
				277
			 | 
			
				280
			 | 
			
			
				
				             Save(); 
			 | 
		
		
	
		
			
			| 
				278
			 | 
			
				281
			 | 
			
			
				
				         } 
			 | 
		
		
	
		
			
			| 
				279
			 | 
			
				282
			 | 
			
			
				
				  
			 | 
		
		
	
	
		
			
			| 
				
			 | 
			
			
				
				@@ -401,7 +404,8 @@ namespace UnivateProperties_API.Repository.Users 
			 | 
		
		
	
		
			
			| 
				401
			 | 
			
				404
			 | 
			
			
				
				                 //send ecrypted token to db 
			 | 
		
		
	
		
			
			| 
				402
			 | 
			
				405
			 | 
			
			
				
				                 user.FPToken = encryptedToken; 
			 | 
		
		
	
		
			
			| 
				403
			 | 
			
				406
			 | 
			
			
				
				  
			 | 
		
		
	
		
			
			| 
				404
			 | 
			
				
			 | 
			
			
				
				-                _dbContext.Users.Update(user); 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				407
			 | 
			
			
				
				+                _dbContext.Entry(user).State = EntityState.Modified; 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				408
			 | 
			
			
				
				+                //_dbContext.Users.Update(user); 
			 | 
		
		
	
		
			
			| 
				405
			 | 
			
				409
			 | 
			
			
				
				                 _dbContext.SaveChanges(); 
			 | 
		
		
	
		
			
			| 
				406
			 | 
			
				410
			 | 
			
			
				
				  
			 | 
		
		
	
		
			
			| 
				407
			 | 
			
				411
			 | 
			
			
				
				                 string linkStr = encryptedToken.Replace('/', '!'); 
			 |