public static void Update1(TranslatedString item) { tblTranslatedString dataItem = CurrDBContext.Get().tblTranslatedString.Where(x => x.Id == item.Id).Single(); dataItem.Language = item.Language; dataItem.ReferencedItemId = item.ReferencedItemId; dataItem.Type = (int)item.Type; dataItem.Value = item.Value; CurrDBContext.Get().SaveChanges(); }
public static void Create1(TranslatedString item) { tblTranslatedString currItem = new tblTranslatedString { Language = item.Language, ReferencedItemId = item.ReferencedItemId, Type = (int)item.Type, Value = item.Value }; CurrDBContext.Get().tblTranslatedString.Add(currItem); CurrDBContext.Get().SaveChanges(); }
public static void CreateN(List <TranslatedString> itemList) { foreach (TranslatedString currItem in itemList) { tblTranslatedString currNewItem = new tblTranslatedString { Language = currItem.Language, ReferencedItemId = currItem.ReferencedItemId, Type = (int)currItem.Type, Value = currItem.Value }; CurrDBContext.Get().tblTranslatedString.Add(currNewItem); } CurrDBContext.Get().SaveChanges(); }