Exemple #1
0
        public async Task <Trainer> PostTrainersAsync(TrainerEntity trainer)
        {
            _context.Trainers.Add(trainer);
            await _context.SaveChangesAsync();

            return(_mapper.Map <Trainer>(trainer));
        }
Exemple #2
0
        public async Task <Member> PostMembersAsync(MemberEntity member)
        {
            _context.Members.Add(member);
            await _context.SaveChangesAsync();

            return(_mapper.Map <Member>(member));
        }
Exemple #3
0
        public async Task <Package> PostPackagesAsync(PackageEntity package)
        {
            _context.Packages.Add(package);
            await _context.SaveChangesAsync();

            return(_mapper.Map <Package>(package));
        }
Exemple #4
0
        public async Task <Feedback> PostFeedbackAsync(FeedbackEntity feedback)
        {
            feedback.Date = DateTime.Today;
            _context.Feedbacks.Add(feedback);
            await _context.SaveChangesAsync();

            return(_mapper.Map <Feedback>(feedback));
        }