You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							28 lines
						
					
					
						
							729 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							28 lines
						
					
					
						
							729 B
						
					
					
				| using System; | |
| using System.Collections.Generic; | |
| using PetaPoco; | |
| using Pingchuan.BeijingSafeguard.Model; | |
| 
 | |
| namespace Pingchuan.BeijingSafeguard.DAL | |
| { | |
|     public class ConfigDAL : BaseDAL | |
|     { | |
|         public static int Update(Config config) | |
|         { | |
|             return db.Update(config); | |
|         } | |
| 
 | |
|         public static List<Config> Query(int pageIndex, int pageSize) | |
|         { | |
|             string sql = $@"select * from configs order by id desc"; | |
|             Page<Config> page = db.Page<Config>(pageIndex, pageSize, sql); | |
|             return page.Items; | |
|         } | |
| 
 | |
|         public static List<Config> All() | |
|         { | |
|             string sql = $@"select * from configs"; | |
|             return db.Fetch<Config>(sql); | |
|         } | |
|     } | |
| } |