public EditManyToManyCommand(SearchTableFromContext <T> request, List <ITableInclude <T> > include, int id) { this.id = id; this.request = request; addCommand = new AddManyToManyCommand <T>(request, include); }
public ControllerInfo(SearchTableFromContext <T> _request, Action <T> _includeValues, SizeSendViewBag _size, string _views) { request = _request; includeMethod = _includeValues; view = _views; sizeDbFilelds = _size; }
public IEnumerable <F> DoSelectCommand <F>(SearchTableFromContext <F> selector, bool pagination = false) where F : class { if (selector == null) { throw new NullReferenceException(); } SelectCommand <F> select = new SelectCommand <F>(selector, pagination); return(SetResultCommand(select)); }
public SelectDefault() { Book = s => s.Books.Include("Translators") .Include("Genres") .Include("Languages") .Include("Author"); Author = s => s.Authors.Include("Books").Include("Genres"); Publisher = s => s.Publishers.Include("Books"); }
protected ICommandVoid GetCommand(SearchTableFromContext <T> selectorInclude, List <ITableInclude <T> > listAdd, T obj) { if (type == CommandType.EditCommand) { return(new EditManyToManyCommand <T>( selectorInclude, listAdd, ReflectionEfId <T> .GetId(obj) )); } return(new AddManyToManyCommand <T>(selectorInclude, listAdd)); }
public sealed override void SetCommand(Author author) { FileController.Obj = author; contextVoid.SetVoidCommand(FileController); RelatedTableCommand <Author, Genre> relTableGenre = new RelatedTableCommand <Author, Genre>( authorType => authorType.Genres, bookDb => bookDb.Genres, ListCollection.genres ); SearchTableFromContext <Author> AuthorContext = s => s.Authors.Include("Genres"); List <ITableInclude <Author> > listManyAuthor = new List <ITableInclude <Author> > { relTableGenre }; contextVoid.SetVoidCommand( GetCommand(AuthorContext, listManyAuthor, author) ); }
public sealed override void SetCommand(Book book) { FileController.Obj = book; contextVoid.SetVoidCommand(FileController); RelatedTableCommand <Book, Genre> relTableGenre = new RelatedTableCommand <Book, Genre>( bookType => bookType.Genres, bookDb => bookDb.Genres, ListCollection.genres ); RelatedTableCommand <Book, Language> relTableLanguage = new RelatedTableCommand <Book, Language>( bookType => bookType.Languages, bookDb => bookDb.Languages, ListCollection.languages ); RelatedTableCommand <Book, Translator> relTableTranslator = new RelatedTableCommand <Book, Translator>( bookType => bookType.Translators, bookDb => bookDb.Translators, ListCollection.translators ); List <ITableInclude <Book> > listManyBook = new List <ITableInclude <Book> >() { relTableGenre, relTableLanguage, relTableTranslator }; SearchTableFromContext <Book> bookContext = s => s.Books .Include("Genres") .Include("Languages") .Include("Translators"); contextVoid.SetVoidCommand( GetCommand(bookContext, listManyBook, book) ); }
public RelatedTableCommand(IncludeTables <T, A> relMethod, SearchTableFromContext <T> request, List <T> SecondTablesList) { this.relMethod = relMethod; this.SecondTablesList = SecondTablesList; this.request = request; }
private JsonResult SetResulst(SearchTableFromContext <T> search, T obj, EntityState entityState) { voidContext.DoAddCommand(obj, entityState); return(Json(selectContext.DoSelectCommand(search))); }
public SelectCommandAsycn(SearchTableFromContext <T> request, bool isPagination) : base(request, isPagination) { }
public SelectCommandAsycn(SearchTableFromContext <T> request) : base(request) { }
public BaseSelectCommad(SearchTableFromContext <T> request, bool isPagination) { this.request = request; this.isPagination = isPagination; }
public BaseSelectCommad(Search <T> request, string search) { this.request = db => request(db, search); }
public BaseSelectCommad(SearchTableFromContext <T> request) { this.request = request; }
public BaseSelectCommad() { request = db => db.Set <T>(); }
public AddManyToManyCommand(SearchTableFromContext <T> request, List <ITableInclude <T> > listIncludeCommand) { this.listIncludeCommand = listIncludeCommand; this.request = request; }
public IQueryable <F> DoSelectCommandQuery <F>(SearchTableFromContext <F> selector) where F : class { SelectCommand <F> select = new SelectCommand <F>(selector); return(SetResultCommand(select).AsQueryable()); }
public SingleController(SearchTableFromContext <T> request, int id) { this.id = id; this.request = request; }
public F DoSingleCommand <F>(SearchTableFromContext <F> selector, int id) where F : class { SingleController <F> singleCommand = new SingleController <F>(selector, id); return(SetResultCommand(singleCommand)); }