Free cookie consent management tool by TermsFeed Policy Generator

source: branches/ClientManagement/HeuristicLab.Services.Authentication/Test/Program.cs @ 4583

Last change on this file since 4583 was 4583, checked in by jhaider, 14 years ago

Added Solution with structure (#1197)

File size: 1.6 KB
RevLine 
[4583]1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Services.Authentication.DataAccess;
6
7namespace Test
8{
9    class Program
10    {
11        static void Main(string[] args)
12        {
13
14            ClientManagmentDataContext dc = new ClientManagmentDataContext(@"Data Source=eagle-eye\sqlexpress;Initial Catalog=ClientManagment;Integrated Security=SSPI;");
15         
16           
17           
18            //if (dc.DatabaseExists())
19            //{
20            //    Console.WriteLine("DB exsits");
21            //    dc.DeleteDatabase();
22            //    Console.WriteLine("DB deleted");
23            //}
24            //Console.WriteLine("DB create");
25            //dc.CreateDatabase();
26            //Console.WriteLine("Finished");
27           
28           
29           
30            Client c = new Client();
31
32            c.ResourceID = Guid.NewGuid();
33            c.Name = "Eagle-Eye";
34            c.Description = "Development-PC";
35            c.IPAdresse = "192.168.0.1";
36            //c.ResourceType = "Client";
37            ResourceGroup r = new ResourceGroup();
38            r.Name = "test";
39
40            ResourceResourceGroup rrg = new ResourceResourceGroup();
41            rrg.ResourceGroup = r;
42            rrg.Client = c;
43           
44           
45            dc.GetTable<Resource>().InsertOnSubmit(r);
46            dc.GetTable<Resource>().InsertOnSubmit(c);
47
48            dc.GetTable<ResourceResourceGroup>().InsertOnSubmit(rrg);
49
50            dc.SubmitChanges();
51
52
53
54
55        }
56    }
57}
Note: See TracBrowser for help on using the repository browser.