Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/17/11 18:31:34 (13 years ago)
Author:
abeham
Message:

#1619

  • Updated Hello (test) service, tested db publishing
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP/HeuristicLab.Services.Hello/3.3/HelloService.svc.cs

    r6780 r6794  
    2020#endregion
    2121
     22
     23using System;
    2224namespace HeuristicLab.Services.Hello {
    2325  public class HelloService : IHelloService {
     
    2527      return "Hello";
    2628    }
     29
     30    public string Say(string phrase) {
     31      using (HelloEntities context = new HelloEntities()) {
     32        Saying s = context.Sayings.CreateObject();
     33        s.message = phrase.Length > 256 ? phrase.Substring(0, 256) : phrase;
     34        s.date = DateTime.Now;
     35        context.Sayings.AddObject(s);
     36        context.SaveChanges();
     37      }
     38      return phrase;
     39    }
    2740  }
    2841}
Note: See TracChangeset for help on using the changeset viewer.