private static string ToMessage(long id, Type type) { Contract.Assert(type != null); var message = string.Format( CultureInfo.InvariantCulture, "Can not load object {0} by id {1}", type.Name, id); return message; }