public async Task <IStepModel> FindByGuiDAsync(string GuiD) { using (GuideDatabaseContext context = GuideDatabaseContextHelper <GuideDatabaseContext> .CreateContext()) { return(await context.Steps.FindAsync(GuiD)); } }
public IList <IStepModel> GetAll() { using (GuideDatabaseContext context = GuideDatabaseContextHelper <GuideDatabaseContext> .CreateContext()) { return(context.Steps.ToList()); } }
public async void UpdateAsync(IStepModel step) { using (GuideDatabaseContext context = GuideDatabaseContextHelper <GuideDatabaseContext> .CreateContext()) { context.Steps.Update(step); await context.SaveChangesAsync(); } }
public async void UpdateAsync(IChapterMapModel chapterMap) { using (GuideDatabaseContext context = GuideDatabaseContextHelper <GuideDatabaseContext> .CreateContext()) { context.ChapterMaps.Update(chapterMap); await context.SaveChangesAsync(); } }
public async void DeleteAsync(IChapterModel chapter) { using (GuideDatabaseContext context = GuideDatabaseContextHelper <GuideDatabaseContext> .CreateContext()) { context.Chapters.Remove(chapter); await context.SaveChangesAsync(); } }