Example #1
0
 public static void AddSeries(WritableSeries series)
 {
     using (var db = new Entities())
     {
         db.Series.Add(series.ToSeries());
         db.SaveChanges();
     }
 }
 public IHttpActionResult PostSeries([FromBody] WritableSeries series)
 {
     try
     {
         SeriesFunctions.AddSeries(series);
         return(Ok());
     }
     catch (Exception e)
     {
         throw new ResponseException(e, Utilities.ExceptionType.Database, series);
     }
 }