GivenType GetOrCreateGivenType(string id) { var type = model.GivenType(t => t.Identifier == id); if (type == null) { type = new GivenType(model) { Identifier = id, Implicit = true }; model.Add(type); } return(type); }