Ejemplo n.º 1
0
 public ContentResult Start()
 {
     try
     {
         _ctx.Database.EnsureDeleted();
         _ctx.Database.EnsureCreated();
         _ctx.Live.Add(new Tulostaulu {
             GamePeriod       = 1,
             HomeHitter       = 1,
             AwayHitter       = 1,
             HomeLastHitter   = 9,
             AwayLastHitter   = 9,
             InningJoker      = 3,
             PeriodInning     = 1,
             InningTurn       = 'A',
             InningInsideTeam = Request.Form["inningInsideTeam"]
         });
         _ctx.SaveChanges();
     }
     catch (Exception ex)
     {
         return(new ContentResult {
             StatusCode = 500, Content = ex.Message
         });
     }
     return(new ContentResult {
         StatusCode = 200
     });
 }