public void ValidationTableColumnDef_Create(ValidationTableColumnDefViewModel valTableColumnDef) { var entity = new ValidationTableColumnDef(); entity.TableName = valTableColumnDef.TableName; entity.ColumnName = valTableColumnDef.ColumnName; parameters.ValidationTableColumnDef.Add(entity); parameters.SaveChanges(); valTableColumnDef.Id = entity.Id; }
public void ValidationTableColumnDef_Destroy(ValidationTableColumnDefViewModel valTableColumnDef) { var entity = new ValidationTableColumnDef(); entity.Id = valTableColumnDef.Id; parameters.ValidationTableColumnDef.Attach(entity); parameters.ValidationTableColumnDef.Remove(entity); parameters.SaveChanges(); }
public void ValidationTableColumnDef_Update(ValidationTableColumnDefViewModel valTableColumnDef) { var entity = new ValidationTableColumnDef(); entity.Id = valTableColumnDef.Id; entity.TableName = valTableColumnDef.TableName; entity.ColumnName = valTableColumnDef.ColumnName; parameters.ValidationTableColumnDef.Attach(entity); parameters.Entry(entity).State = EntityState.Modified; parameters.SaveChanges(); }