I'm pretty sure this is not the intended working: I'm querying for a content part with a specific id:
var item = _contentManager
.Where(mi => mi.Id == id).List().FirstOrDefault<MyItemPart>();
it (correctly) returns null if no items were found. (I'm not using
var item = _contentManager.Get<MyItemPart>(id);
because it returns an empty, new content part object if none was found.)
So I'm using the first example, but I noticed that later the framework creates the record! (The item variable is not modified in any way, just checked whether it equals null.)
Any ideas to prevent the new record from being created?
Thanks in advance!