예제 #1
0
 public static async Task <List <WatermarkingResults> > GetAllResultByMode(List <int> modes)
 {
     using (WatermarkingEntities context = new WatermarkingEntities())
     {
         return(await context.WatermarkingResults.AsNoTracking().Where(x => modes.Contains((int)x.Mode)).ToListAsync());
     }
 }
예제 #2
0
 public static async Task <List <WatermarkingResults> > GetAllResults()
 {
     using (WatermarkingEntities context = new WatermarkingEntities())
     {
         return(await context.WatermarkingResults.AsNoTracking().ToListAsync());
     }
 }
예제 #3
0
 public static async Task <List <WatermarkingResults> > GetAllResultByMode(int mode)
 {
     using (WatermarkingEntities context = new WatermarkingEntities())
     {
         return(await context.WatermarkingResults.AsNoTracking().Where(x => x.Mode == mode).ToListAsync());
     }
 }
예제 #4
0
 public static async Task InsertResult(WatermarkingResults result)
 {
     using (WatermarkingEntities context = new WatermarkingEntities())
     {
         context.WatermarkingResults.Add(result);
         await context.SaveChangesAsync();
     }
 }
예제 #5
0
 public static async Task InsertResults(IList <WatermarkingResults> results)
 {
     using (WatermarkingEntities context = new WatermarkingEntities())
     {
         context.WatermarkingResults.AddRange(results);
         await context.SaveChangesAsync();
     }
 }