You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
473 B
22 lines
473 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using ToDoApp.Context;
|
|
|
|
namespace ToDoApp.Service
|
|
{
|
|
public class DbService
|
|
{
|
|
public static DbService Instance { get; set; } = new DbService();
|
|
|
|
public void EnsureCreated()
|
|
{
|
|
using (var context = new ToDoContext())
|
|
{
|
|
context.Database.EnsureCreated();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|