This project is read-only.

Simple SQL requests

Initialization:

public void Init(IUnityContainer container)
{
    container.RegisterSimpleSql<Development>();
}

Call a service method

using Fuse8.DomainFramework.BusinessService;

public IEnumerable<Development> GetAllEntities()
{
    return new BusinessServiceFacade<Development, int>().FindAll();
}

public Development GetEntityById(int id)
{
    return new BusinessServiceFacade<Development, int>().FindOne(id);
}

public IEnumerable<Development> GetEntityByDevelopmentTypeId(int developmentTypeId)
{
    return new BusinessServiceFacade<Development, int>().Find(x => x.DevelopmentTypeId == developmentTypeId);
}

DF will automatically build a SQL request. For the full list of supported expressions in the FindOne and Find please refer here.

Last edited Apr 1, 2013 at 6:36 AM by olgabutova, version 3

Comments

No comments yet.