public virtual void Save() { IRepository <Measurement> repo = new MeasurementRepository(); this.created_at = DateTime.Now; this.updated_at = DateTime.Now; repo.Save(this); }
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); }