public ActionResult New(UnitCategoryForm form) { Debug.WriteLine(string.Format("POST: Unit Category Controller: New - gameID={0}", GameState.GameID)); var game = GameState.Game; DB_unit_categories category = new DB_unit_categories(); category.game_id = game.Info.id; category.name = form.Name; category.build_rate = form.BuildRate; category.is_military = form.IsMilitary; Database.Session.Save(category); Database.Session.Flush(); return(RedirectToRoute("Statistics")); }
public Unit(DB_units unit, DB_unit_categories category) { Info = unit; UnitCategory = category; }