public override void Scaffold(XmlEntity entityContext, ITobascoContext tobascoContext, string appRoot) { AddUsingNamespaces(entityContext, tobascoContext); Builder.StartNamesspace(tobascoContext.EntityContext.EntityLocation.GetNamespace()); AddClass(entityContext, tobascoContext); Builder.EndNamespace(); CreateOrOverwriteFile( $"{appRoot}//" + $"{FileLocationHelper.GetFileLocation(entityContext.EntityLocation, tobascoContext.EntityContext.EntityLocation)}//" + $"{entityContext.Name}.cs"); }
public override void Scaffold(XmlEntity xmlEntity, ITobascoContext tobascoContext, string appRoot) { AddInsert(xmlEntity, tobascoContext); Builder.AppendLine("GO"); AddUpdate(xmlEntity, tobascoContext); Builder.AppendLine("GO"); AddDelete(xmlEntity, tobascoContext); Builder.AppendLine("GO"); AddGetById(xmlEntity, tobascoContext); Builder.AppendLine("GO"); AddGetByParentId(xmlEntity, tobascoContext); Builder.AppendLine("GO"); CreateOrOverwriteFile( $"{appRoot}//" + $"{FileLocationHelper.GetFileLocation(xmlEntity.DatabaseContext.StoredProcedureLocation, tobascoContext.DatabaseContext.StoredProcedureLocation)}//" + $"{xmlEntity.Name}.sql"); }
public override void Scaffold(XmlEntity xmlEntity, ITobascoContext tobascoContext, string appRoot) { AddTable(xmlEntity, tobascoContext); Builder.AppendLine("GO"); AddIndexes(xmlEntity, tobascoContext); Builder.AppendLine("GO"); AddConstraints(xmlEntity, tobascoContext); Builder.AppendLine("GO"); AddHistoryTable(xmlEntity, tobascoContext); Builder.AppendLine("GO"); AddTriggers(xmlEntity, tobascoContext); Builder.AppendLine("GO"); AddDescriptions(xmlEntity, tobascoContext); CreateOrOverwriteFile( $"{appRoot}//" + $"{FileLocationHelper.GetFileLocation(xmlEntity.DatabaseContext.TableLocation, tobascoContext.DatabaseContext.TableLocation)}//" + $"{xmlEntity.Name}.sql"); }