public List<MotionDetectionEvent> GetMotionSecurityEvents(int pageSize, int pageNumber, out int total) { List<MotionDetectionEvent> result; using (ServerDataAccess conf = new ServerDataAccess("HomeSecureData")) { result = conf.GetMotionDetectionEvents(pageSize,pageNumber,out total); } return result; }
static void Main(string[] args) { Logger.Init("Log.config", "DataAccessTestLogger"); MotionDetectionEvent mde = new MotionDetectionEvent() { CameraDevice = new CameraDevice() { ID = "123", Name = "Name" }, ID = 1, NumberOfPixelsDetected = 100, SecurityEventTime = DateTime.Now }; ServerDataAccess conf = new ServerDataAccess("HomeSecureData"); conf.AddMotionDetectionEvent(mde); int total = 0; List<MotionDetectionEvent> motionDetectionEvents = conf.GetMotionDetectionEvents(2, 1, out total); }