Skip to content

p-26/Deblazer.Artifacts

 
 

Repository files navigation

Deblazer Artifacts

Build Status Build Status

This project is used to generate the artifact classes for the C# Deblazer ORM used by Digitec Galaxus

Roslyn is used to generate the artifact classes from a DBML File generate by the SqlMetal.exe

Getting Started

Download the latest release from

Usuage

  1. Download SQL Metal
  2. Generate DBML File:
sqlmetal.exe /conn:"Data Source=MySQlServer;Initial Catalog=MyDatabase;Integrated Security=True;" /timeout:0 /dbml:"DataClasses.dbml" /namespace:devinite.Meta.DbLayer /language:csharp /pluralize
  1. Generate Artifacts
deblazer.artifacts.exe -dbml <Path to DBML File> -o <OutputPath>
  1. Add the files to a .csproj
  2. Add References for System.ComponentModel.DataAnnotations and System.Data.Linq
  3. Create a "Db" Class for accessing your artifacts
using Dg.Deblazer.Write;

namespace Deblazer.WideWorldImporter.DbLayer
{
    public class Db : WriteDb
    {
	    public Db(string connectionString) : base(connectionString, allowLoadingBinaryData: true)
	    {}
	}
}
  1. Create a query
var topTenPeople = db.Application_Peoples()
    .TakeDb(takeCount)
    .ToList();

Development

The tooling uses f# as primary Language targeting the .NET 4.6.1 Framework. .NET core is not yet possible because of the usuage of an XML Type-Provider.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C# 84.1%
  • F# 15.9%