コード例 #1
0
ファイル: WM2010Manager.cs プロジェクト: MarioBinder/WM2010
        /// <summary>
        /// Methode zum Erstellen eines SpielOrtes
        /// </summary>
        public static SpielOrt CreateSpielOrt(SpielOrt spielOrt)
        {
            if (spielOrt == null)
                throw new ArgumentNullException("spielOrt");

            using (var context = new WM2010Entities())
            {
                context.AddToSpielOrt(spielOrt);
                context.SaveChanges();
                context.Refresh(RefreshMode.StoreWins, spielOrt);

                return spielOrt;
            }
        }