private void ExecuteQuery(string query) { using (var Context = new EasyUKRainianEntities()) { Context.Database.ExecuteSqlCommand(query); } }
public Repo() { var DBData = new EasyUKRainianEntities(); topics = DBData.Topic.Select( c => new TopicR { header = c.Header, capacity = c.Capacity, image = new ImageButton { ImageUrl = c.Image }, words = DBData.Word.Where(w => w.TopicID == c.TopicID) .Select( w => new WordR { word = w.Word1, translates = DBData.Translate.Where(t => t.WID == w.WID) .Select( t => new TranslateR { image = new Image { ImageUrl = t.ImageLink }, translate = t.Translate1 }) .ToList() }) .ToList() }).ToList(); }