Exemple #1
0
        public static async Task <ScraperText> UpdateOrCreateAsync(this PolysenseContext dbContext, ScraperText scraperText)
        {
            await dbContext.UpdateOrCreateAsync(scraperText.Category);

            return(await dbContext.UpdateOrCreateAsync(dbContext.ScraperText, scraperText, s => s.Id == scraperText.Id || s.Text == scraperText.Text));
        }
 public ScraperTextsController(PolysenseContext context) : base(context)
 {
 }
Exemple #3
0
 public static Task <bool> TryDeleteAsync(this PolysenseContext dbContext, DbSet <ScraperText> dbSet, int id)
 {
     return(dbContext.TryDeleteAsync(dbSet, id));
 }
Exemple #4
0
 public static Task <bool> TryDeleteAsync(this PolysenseContext dbContext, ScraperText scraperText)
 {
     return(dbContext.TryDeleteAsync(dbContext.ScraperText, scraperText));
 }
 public TextCategoriesController(PolysenseContext context) : base(context)
 {
 }
 public PoliticiansController(PolysenseContext context) : base(context)
 {
 }
 public static Task <TextCategory> UpdateOrCreateAsync(this PolysenseContext dbContext, TextCategory model)
 {
     return(dbContext.UpdateOrCreateAsync(dbContext.TextCategory, model, m => m.Id == model.Id || m.Name == model.Name));
 }
 public BillVotesController(PolysenseContext context) : base(context)
 {
 }
Exemple #9
0
 public BaseAPI(PolysenseContext context)
 {
     _context = context;
 }