Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/10/13 16:32:19 (11 years ago)
Author:
spimming
Message:

#1888:

  • Workaround for enums in model classes
  • Implemented dao methods for model
  • Added test data in db seed method
  • changed EF configuration
  • Implemented some BL methods
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OaaS/HeuristicLab.Services.Optimization.Billing/Business/BillingService.cs

    r9586 r9602  
    4545    }
    4646
     47    public IList<Order> GetOrders(string userName) {
     48      //TODO: Authentication
     49      //TODO: Enable Transaction
     50      User user = GetUser(userName);
     51      return BillingDao.FindOrderBy(order => order.User == user).ToList();
     52    }
     53
    4754    #endregion
    4855
    49 
    50     public IList<Order> GetOrders(string userName) {
    51       throw new System.NotImplementedException();
    52     }
    53 
     56    #region User Methods
    5457
    5558    public User GetUser(string userName) {
    56       throw new System.NotImplementedException();
     59      //TODO: Authentication
     60      //TODO: Enable Transaction
     61      return BillingDao.FindUserBy(u => u.Name == userName).First();
    5762    }
    5863
    5964    public void SaveUser(User user) {
    60       throw new System.NotImplementedException();
     65      //TODO: Authentication
     66      //TODO: Enable Transaction
     67      BillingDao.AddUser(user);
    6168    }
    6269
     70    #endregion
     71
     72    #region UsageRecords Methods
    6373
    6474    public IList<UsageRecord> GetUsageRecords(string userName) {
    65       throw new System.NotImplementedException();
     75      //TODO: Authentication
     76      //TODO: Enable Transaction
     77      User user = GetUser(userName);
     78      return BillingDao.FindUsageRecordsBy(ur => ur.User == user).ToList();
    6679    }
    6780
     81    #endregion
     82
     83    #region Invoice Methods
    6884
    6985    public IList<Invoice> GetInvoices(string userName) {
    70       throw new System.NotImplementedException();
     86      //TODO: Authentication
     87      //TODO: Enable Transaction
     88      User user = GetUser(userName);
     89      return BillingDao.FindInvoiceBy(inv => inv.User == user).ToList();
    7190    }
     91
     92    #endregion
    7293  }
    7394}
Note: See TracChangeset for help on using the changeset viewer.