Ejemplo n.º 1
0
        public async Task<ActivityDto> PutActivity(ActivityDto activityDto)
        {
            var activity = new Activity();
            activity.InjectFrom(activityDto);
            activity.Active = true;
            await _activityOperations.Create(activity);

            var result = new ActivityDto();
            result.InjectFrom(activity);
            return result;
        }
Ejemplo n.º 2
0
 public async Task Update(Activity activity)
 {
     _session.Entry(activity).Property(u => u.Active).IsModified = true;
     _session.Entry(activity).Property(u => u.ActivityDescription).IsModified = true;
     await _session.SaveChangesAsync();
 }
Ejemplo n.º 3
0
 public async Task Create(Activity activity)
 {
     _session.Activities.Add(activity);
     await _session.SaveChangesAsync();
 }