Beispiel #1
0
 public void InsertDeveloper(Developer developer)
 {
     try
     {
         Cart cart = Get();
         cart.InsertDeveloper(developer);
         Save(cart);
     }
     catch { throw; }
 }
 public void InsertDeveloper(string username, string avatar, decimal price)
 {
     try
     {
         Developer developer = new Developer() { Username = username,Avatar = avatar, Price = price};
         cart.InsertDeveloper(developer);
     }
     catch (Exception e)
     {
         throw new HttpResponseException(
                             new HttpResponseMessage()
                             {
                                 StatusCode = HttpStatusCode.InternalServerError,
                                 ReasonPhrase = e.Message
                             });
     }
 }
Beispiel #3
0
 public void InsertDeveloper(Developer developer)
 {
     if (!Developers.Contains(developer) && !string.IsNullOrEmpty(developer.Username))
         Developers.Add(developer);
 }