public EditionPopupMessage(string notification, T model, IDisconGenericRepository <T> repository, Action aceptMessageCallback = null, Action cancelMessageCallBack = null) : base(notification)
 {
     Model = model;
     AceptMessageCallBack  = aceptMessageCallback;
     CancelMessageCallBack = cancelMessageCallBack;
     Repository            = repository;
 }
        public HomeController(IDisconGenericRepository <FootballClub> repository)
        {
            //using(var context = new MyDBEntities())
            //{
            //    var data2 = context.Cities.ToList();
            //}


            //var data = repository.All().ToList();
        }
        public MainViewModel(IDisconGenericRepository <FootballClub> repository)
        {
            ////if (IsInDesignMode)
            ////{
            ////    // Code runs in Blend --> create design time data.
            ////}
            ////else
            ////{
            ////    // Code runs "for real"
            ////}

            _repository = repository;

            Data = new ObservableCollection <FootballClub>(_repository.All());
        }
 public InsertViewModel(FootballClub model, IDisconGenericRepository <FootballClub> repository)
 {
     Model       = model;
     _repository = repository;
 }
 public void Constructor_ThrowException()
 {
     instance = new DisconGenericRepository <FootballClub>(null);
 }
        public void Initialize()
        {
            Func <DbContext> contextCreator = () => new MyDBEntities() as DbContext;

            instance = new DisconGenericRepository <FootballClub>(dbContextCreator: contextCreator);
        }
Пример #7
0
 public FootballClubsController(IDisconGenericRepository <FootballClub> repository)
 {
     _repository = repository;
 }