This is a personal reminder that default IdentityUser and its friends (like IdentityRole) generate the ID value in its constructor. These classes extend the behavior of the generic classes (IdentityUser implements IdentityUser<TKey, …> with IdentityUser<string, …>). If you happen to use your own class that inherits from them, you’ll be responsible for generating that ID. Otherwise, you’ll get an error like the following: System.Data.SqlClient.SqlException: Cannot insert the value NULL into column ‘Id’ table ‘dbo.AspNetUsers’; column does not allow nulls. INSERT fails. The statement has been terminated. IdentityUser implementation IdentityUser: Microsoft Docs | Code at Github (aspnet/Identity) IdentityUser<TKey, TLogin, TRole, TClaim> : Microsoft Docs | Code at Github (aspnet/Identity) IdentityRole implementation IdentityRole:… Read More
Continue ReadingProblems with ADB via WIFI
If you develop Android apps, you might get into problems when trying to debug through WIFI and get that dreadful message. unable to connect to 192.168.1.xxx:5555: cannot connect to 192.168.1.xxx:5555 A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (10060) Network stuff is tricky because it’s difficult to debug and once you’ve resolved the problem thanks to any web post, you forget again until the next time. That’s why, I’m going to list here common causes and possible solutions. You will have found some of them in other sites because they are… Read More
Continue ReadingGit Cheatsheet
I needed this, I was like every hour searching in Google one of the following commands… and having this page cached looks more efficient. Commands git clone URL folder This clones a repo to a given folder. If you don’t write the folder, it will try to clone it in a folder whose name be the repo name. If there is already a folder with that name, the clone process will fail. git init It creates a git structure in the current folder git add file It stages the given file. If you put a dot instead, it stages everything. git commit -m “Your commit message” It creates a commit with… Read More
Continue ReadingDebug mobile app in both mobile and computer
While we are developing a mobile app that talks to an API on our own, we may want to just put a breakpoint in an API call and see what happens. Although the best way to test and API is with programs like Postman, there are occasions where we need some context about when a call is made and for what reason. This looks difficult considering the fact that we are developing the API in the computer’s localhost, which is different than mobile’s localhost. We usually have an intuition here because we think that, being in the same network, there should be a way to access the computer. If you… Read More
Continue Reading