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

            using (var context = new WM2010Entities())
            {
                context.AddToGruppe(gruppe);
                context.SaveChanges();

                context.Refresh(RefreshMode.StoreWins, gruppe);
            }
            return gruppe;
        }