I have this code:
public ObjectModel.Path GetPath(int pathid)
{
var path = this.DbContext.Paths.Find(pathid);
var app = GetApplicationById(path.ApplicationId.GetValueOrDefault());
var p = new Path
{
ApplicationId = path.ApplicationId,
Id = path.Id, Password = path.Password,
UserName = path.UserName,
LocalUrl = string.IsNullOrEmpty(path.LocalUrl) ? null : System.IO.Path.Combine(path.LocalUrl, app.Name)
};
return p;
}
The variable p is always null. How is this posible?
Here is a print screen of what I am talking about:
I also try with immediate windows I got this:
p CANNOT BE NULL since im creating a new instance of it while all of its properties are not null. I tried clean the project, restart windows, open visual studio as administrator and nothing happened.
Any idea why?
The application is running on .net 4.0, visual studio 2017 v15.2(26430.13) relase.

