public MessageData Add(MessageData entity)
        {
            _context.MessageDataItems.Add(entity);
            _context.SaveChanges();

            return(entity);
        }
Beispiel #2
0
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;

            //DB migration runner
            var ctx = new MessageDataContext();

            ctx.Database.EnsureCreated();
            ctx.CheckInitialDataSetup();
            ctx.SaveChanges();
            ctx.Dispose();
        }