aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/DataStore/Tango.DataStore.EF/ExtensionMethods.cs
blob: 6d45a69e7978f2ffb438355d5f27d72f2149dfac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.DataStore;
using Tango.DataStore.EF;

public static class ExtensionMethods
{
    public static IDataStoreItem ToDataStoreItem(this DataStoreItem item)
    {
        return EFDataStoreHelper.CreateDataStoreItem(item);
    }

    public static IDataStoreItem ToDataStoreItem(this GlobalDataStoreItem item)
    {
        return EFDataStoreHelper.CreateDataStoreItem(item);
    }

    public static DataStoreItem ToLocalDbDataStoreItem(this IDataStoreItem item, String collection)
    {
        return EFDataStoreHelper.CreateLocalDbDataStoreItem(item, collection);
    }

    public static GlobalDataStoreItem ToGlobalDbDataStoreItem(this IDataStoreItem item, String collection)
    {
        return EFDataStoreHelper.CreateGlobalDbDataStoreItem(item, collection);
    }
}