public static string DetermineCollectionType(RavenJObject metadata) { var id = metadata.IfPresent <string>("@id") ?? string.Empty; if (string.IsNullOrEmpty(id)) { return("Projection"); // meaning that the document is a projection and not a 'real' document } if (id.StartsWith("Raven/")) { return("Sys Doc"); } var entity = metadata.IfPresent <string>(Constants.RavenEntityName); return(entity ?? "Doc"); }
public static string DetermineCollectionType(RavenJObject metadata) { var id = metadata.IfPresent <string>("@id") ?? string.Empty; if (string.IsNullOrEmpty(id)) { return(BuiltinCollectionName.Projection); // meaning that the document is a projection and not a 'real' document } var entity = metadata.IfPresent <string>(Constants.RavenEntityName); if (entity != null) { entity = entity.ToLower(); } return(entity ?? (id.StartsWith("Raven/") ? BuiltinCollectionName.System : BuiltinCollectionName.Document)); }
public static string DetermineCollectionType(RavenJObject metadata) { var id = metadata.IfPresent<string>("@id") ?? string.Empty; if (string.IsNullOrEmpty(id)) return "Projection"; // meaning that the document is a projection and not a 'real' document if (id.StartsWith("Raven/")) return "Sys Doc"; var entity = metadata.IfPresent<string>(Constants.RavenEntityName); if (entity != null) entity = entity.ToLower(); return entity ?? "Doc"; }