Index: branches/OaaS/HeuristicLab.Services.Optimization.Billing/Model/Model.cs
===================================================================
--- branches/OaaS/HeuristicLab.Services.Optimization.Billing/Model/Model.cs	(revision 9558)
+++ branches/OaaS/HeuristicLab.Services.Optimization.Billing/Model/Model.cs	(revision 9576)
@@ -1,10 +1,8 @@
 ﻿using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.Services.Optimization.Billing.Model {
   public class ContactInformation {
-    public long Id { get; set; }
+    public long ContactInformationId { get; set; }
     public string OrganizationName { get; set; }
     public string Street { get; set; }
@@ -26,5 +24,5 @@
 
   public class Product {
-    public long Id { get; set; }
+    public long ProductId { get; set; }
     public string Name { get; set; }
     public string Description { get; set; }
@@ -34,4 +32,5 @@
 
   public class User {
+    public long UserId { get; set; }
     public string Name { get; set; }
   }
@@ -46,51 +45,68 @@
 
   public class Order {
-    public long Id { get; set; }
-    public User User { get; set; }
+    public long OrderId { get; set; }
+    public long UserId { get; set; }
     public string BillingType { get; set; }
-    public OrderState State { get; set; }
+    public long OrderStateId { get; set; }
     public string BillingPeriod { get; set; }
     public DateTime ActiveSince { get; set; }
     public DateTime ActiveUntil { get; set; }
-    public IList<Invoice> Invoices { get; set; }
-    public IList<OrderLine> OrderLines { get; set; }
+
+
+    public virtual User User { get; set; }
+    public virtual OrderState State { get; set; }
+    public virtual IList<Invoice> Invoices { get; set; }
+    public virtual IList<OrderLine> OrderLines { get; set; }
   }
 
   public class OrderLine {
-    public long Id { get; set; }
-    public Order Order { get; set; }
-    public Product Product { get; set; }
+    public long OrderLineId { get; set; }
+    public long OrderId { get; set; }
+    public long ProductId { get; set; }
     public int Quantity { get; set; }
     public double ProductPrice { get; set; }
+
+    public virtual Order Order { get; set; }
+    public virtual Product Product { get; set; }
   }
 
   public class Invoice {
-    public long Id { get; set; }
-    public User User { get; set; }
+    public long InvoiceId { get; set; }
+    public long UserId { get; set; }
+    public long OrderId { get; set; }
     public DateTime Due { get; set; }
     public string Status { get; set; }
     public string InvoiceDocument { get; set; }
-    public Order Order { get; set; }
+
+    public virtual User User { get; set; }
+    public virtual Order Order { get; set; }
   }
 
   public class InvoiceLine {
-    public long Id { get; set; }
-    public Invoice Invoice { get; set; }
-    public Product Product { get; set; }
+    public long InvoiceLineId { get; set; }
+    public long InvoiceId { get; set; }
+    public long ProductId { get; set; }
     public int Quantity { get; set; }
     public double ProductPrice { get; set; }
+
+    public virtual Invoice Invoice { get; set; }
+    public virtual Product Product { get; set; }
   }
 
-  public class Usage {
-    public long Id { get; set; }
-    public User User { get; set; }
-    public IList<UsageLine> UsageLines { get; set; }
+  public class UsageRecord {
+    public long UsageRecordId { get; set; }
+    public long UserId { get; set; }
+
+    public virtual User User { get; set; }
+    public virtual IList<UsageRecordLine> UsageRecordLines { get; set; }
   }
 
-  public class UsageLine {
-    public long Id { get; set; }
-    public Usage Usage { get; set; }
+  public class UsageRecordLine {
+    public long UsageRecordLineId { get; set; }
+    public long UsageRecordId { get; set; }
     public DateTime Begin { get; set; }
     public DateTime End { get; set; }
+
+    public virtual UsageRecord UsageRecord { get; set; }
   }
 }
