public void Setup() { //Arrange manager = new ConnectionManagementService(connectionString, databaseName); metadata = new MetadataService(null, null); branch = new BranchService(); state = new StateService(); field = new FieldService(); validation = new ValidationService(); KeyId = new KeyGenerates(8); property = new PropertyService(); data = new DataService(); }
public PropertiesModel GetProperties(string id) { if (id != null) { var collection = _Database.GetCollection <PropertiesModel>("Properties"); return(collection.Find(s => s.ID == id).FirstOrDefault()); } //É gerado um modelo de dados default; KeyGenerates KeyId = (new KeyGenerates(8)); KeyId.SetKey(); return(new PropertiesModel() { ID = KeyId.GetKey(), Size = 0, Value = null, Maxlength = 0, Required = false }); }