示例#1
0
        public virtual void Save()
        {
            IRepository <Measurement> repo = new MeasurementRepository();

            this.created_at = DateTime.Now;
            this.updated_at = DateTime.Now;
            repo.Save(this);
        }
示例#2
0
        private void DatabaseOperation(MeasurementModel model)
        {
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            parameters.Add("@MeasurmentId", model.MeasurmentId.ToString());
            parameters.Add("@Measurement_Name", model.MeasurmentName);
            parameters.Add("@IsActive", model.IsActive.ToString());
            parameters.Add("@flag", model.Flag.ToString());
            _measurementRepo.Save(parameters);
        }