예제 #1
0
        public TModel.Location.AreaAndDev.Dev_CameraInfo AddCameraInfo(TModel.Location.AreaAndDev.Dev_CameraInfo cameraInfo)
        {
            DbModel.Location.AreaAndDev.Dev_CameraInfo dbCamera = cameraInfo.ToDbModel();
            var result = CameraInfoSet.Add(dbCamera);

            return(result ? dbCamera.ToTModel() : null);
        }
예제 #2
0
        public TModel.Location.AreaAndDev.Dev_CameraInfo ModifyCameraInfo(TModel.Location.AreaAndDev.Dev_CameraInfo camInfo)
        {
            camInfo.AutoGenerateRtsp();
            var dbModel = camInfo.ToDbModel();

            if (db.Dev_CameraInfos.Edit(dbModel))
            {
                return(camInfo);
            }
            else
            {
                return(null);
            }
        }