Exemplo n.º 1
0
        public RecordActivityController(StroopApiContext context)
        {
            _context = context;

            if (_context.RecordActivities.Count() == 0)
            {
                _context.RecordActivities.Add(new RecordActivity {
                    IdUser = 1, Stage = "1", Status = "Ok", Ink = "rojo", Text = "rojo", Selected = "rojo", Time = DateTime.Now.ToString("MM/dd/yyyy H:mm:ss")
                });
                _context.SaveChanges();
            }
        }
Exemplo n.º 2
0
        public UserController(StroopApiContext context)
        {
            _context = context;

            if (_context.Users.Count() == 0)
            {
                _context.Users.Add(new User
                {
                    FullName = "Test Test",
                    Email    = "*****@*****.**",
                    Gender   = "Masculino",
                    Age      = 20
                });
                _context.SaveChanges();
            }
        }