public IHttpActionResult Post(int resourceId, ResourceActivityViewModel activity)
 {
     var entity = new ResourceActivity();
     Mapper.Map(activity, entity);
     activityService.AddResourceActivity(entity);
     activity.Id = entity.Id;
     return Created(Url.Link("DefaultApi", new { controller = "ResourceActivities", id = activity.Id }), activity);
 }
 public ResourceActivity AddResourceActivity(ResourceActivity activity)
 {
     activityRepository.Add(activity);
     SaveChanges();
     return activity;
 }