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.
 
 
 
 

31 lines
772 B

using System;
using System.Collections.Generic;
using Pingchuan.BeijingSafeguard.Model;
namespace Pingchuan.BeijingSafeguard.DAL
{
public class PointDAL : BaseDAL
{
public static int Add(Point point)
{
object id = db.Insert(point);
return int.Parse(id.ToString());
}
public static int Update(Point point)
{
return db.Update(point);
}
public static int Delete(int id)
{
return db.Delete<Point>(id);
}
public static List<Point> Query(string region, int userId)
{
string sql = $@"select * from points where region = @0 and user_id = @1";
return db.Fetch<Point>(sql, region, userId);
}
}
}