/// <summary> /// Deprecated Method for adding a new object to the BengaliDefinitions EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToBengaliDefinitions(BengaliDefinition bengaliDefinition) { base.AddObject("BengaliDefinitions", bengaliDefinition); }
/// <summary> /// Create a new BengaliDefinition object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="word">Initial value of the Word property.</param> /// <param name="bengali">Initial value of the Bengali property.</param> public static BengaliDefinition CreateBengaliDefinition(global::System.Int64 id, global::System.String word, global::System.String bengali) { BengaliDefinition bengaliDefinition = new BengaliDefinition(); bengaliDefinition.Id = id; bengaliDefinition.Word = word; bengaliDefinition.Bengali = bengali; return bengaliDefinition; }
void UpdateGoogleBengaliWord(GreWord word, string definition) { BengaliDefinition gs = (_entities.BengaliDefinitions.Where(w => w.GreWord.Word == word.Word && w.Bengali == definition)).FirstOrDefault(); if (gs == null) { gs = new BengaliDefinition() { GreWord = word, Bengali = definition }; _entities.AddToBengaliDefinitions(gs); _entities.SaveChanges(); } }