public IRecipe GetRecipe(ICandidateKey recipeKey) { string fileName = recipeKey.Key as string; if (string.IsNullOrEmpty(fileName)) return null; return LoadRecipe (fileName); }
public void AddCandidateKey(ICandidateKey key) { if (key == null) { throw new ArgumentNullException("key"); } _candidateKeys.Add(key); }
public IRecipe GetRecipe(ICandidateKey recipeKey) { string fileName = recipeKey.Key as string; if (string.IsNullOrEmpty(fileName)) { return(null); } return(LoadRecipe(fileName)); }
public ForeignKey(ICandidateKey candidateKey, string nameSource, string nameTarget, Cardinality cardinality) : base(nameSource, nameTarget) { if (candidateKey == null) { throw new ArgumentNullException("candidateKey"); } _candidateKey = candidateKey; _cardinality = cardinality; }
public static IRecipe GetRecipeNoThrow(this IRecipeService service, ICandidateKey id) { try { return(service.GetRecipe(id)); } catch { return(null); } }
private void AddPrimaryKey(XmlElement parent, ICandidateKey key) { var primaryKey = AddElement(parent, "primaryKey"); AddElement(primaryKey, "name", MakeSqlIdentifier(key.NameTarget)); foreach (var field in key.Fields) { AddElement(primaryKey, "column", MakeSqlIdentifier(field.Key.NameTarget)); } }
public IRecipe GetRecipe(ICandidateKey recipeId) { return GetRecipe((ModelId<IRecipe>)null); }
public static IRecipe GetRecipeNoThrow(this IRecipeService service, ICandidateKey id) { try { return service.GetRecipe (id); } catch { return null; } }
public IRecipe GetRecipe(ICandidateKey recipeId) { return(GetRecipe((ModelId <IRecipe>)null)); }