Skip to content
Eros Stein edited this page Jan 6, 2017 · 28 revisions

Welcome to the blayer wiki! Here you'll find detailed information on how to use the library.

Here's how to get started:

Project Structure

You only need one project to handle your domain interactions to work with Blayer.Data, but desirably you'd have the following structure:

  • Create 2 projects:

    1. Your.Namespace.Domain
    2. Your.Namespace.Poco
  • Add Blayer.Data to your domain project

Inside the domain project

Folders:

  1. AdditionalSteps
  2. ModelConfiguration
  3. Notifications
  4. Repositories
  5. Validations

A file in the root of the project named AppConfiguration (just an example) with the content:

namespace UserNamespace
{
    public class AppConfiguration : RepositoryConfiguration
    {
    }
}

This project should reference Blayer.Data and Your.Namespace.Poco (if you have that project).

Inside the POCO project

Just your regular POCO classes

Setting up the templates

Copy the folders under Blayer.Data/Templates to:

C:\Program Files (x86)\<your_vs_version>\Common7\IDE\ItemTemplates\CSharp\Blayer

Example:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ItemTemplates\CSharp\Blayer

This will allow you to use the code templates provided to be used with Blayer.

Optional, but very likely you'll need to do it, step

It's very likely VS won't just reload and show you the new templates, so you might need to:

  1. Close all instances of Visual Studio.
  2. Delete the ItemTemplateCache folder inside C:\Program Files (x86)\<your_vs_version>\Common7\IDE
  3. On the Start menu, click Run, type cmd, and click OK.
  4. At the command prompt, locate the directory that contains devenv.exe, and type devenv /installvstemplates.
  5. Run devenv /setup.
  6. Run Visual Studio.

More information:

Clone this wiki locally