I have trouble to getting my linq line to work.
var result = databaseObjects.Where(dbo => dbo.GetType() == typeof(Model.DatabaseTable) ? (dbo as Model.DatabaseTable).FullName.Equals(name) : dbo.Name.Equals(name));
I tried to use the method from an answer to this question to make it work. I think i know what is wrong, DatabaseObject is a abstract class, and i want to to avoid to use FullName property on everything else than DatabaseTable, but from what i can see it does check on it.
EDIT: The Error was:
System.NullReferenceException was unhandled
{"Object reference not set to an instance of an object."}
Problem was i forgot to assign DatabaseObject.Name, DatabaseTableObject.FullName was assigned.