public IHttpActionResult PostCategory([FromBody]CategoryViewModel category_view_model)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }
            Category category = new Category { Id = category_view_model.Id, Name = category_view_model.Name };
            db.Categories.Add(category);
            db.SaveChanges();

            return CreatedAtRoute("DefaultApi", new { id = category.Id }, ToViewModel(category));
        }
 private CategoryViewModel ToViewModel(Category c)
 {
     return new CategoryViewModel { Id = c.Id, Name = c.Name, TimestampString=Convert.ToBase64String( c.Timestamp ) };
 }