Beispiel #1
0
        //public T GetRepository<T>() where T : class
        //{
        //    using (var kernel = new StandardKernel())
        //    {
        //        kernel.Load(Assembly.GetExecutingAssembly());
        //        var result = kernel.Get<T>(new ConstructorArgument("context", context));

        //        if (result != null)
        //        {
        //            return result;
        //        }
        //    }

        //    return null;

        //}

        public int Commit()
        {
            return(context.SaveChanges());
        }