public Achievements(AddAchievementViewModel model) { AchievementId = Guid.NewGuid(); Name = model.Name; Description = model.Description; ImageUri = model.ImageUri; }
public async Task Insert(AddAchievementViewModel model) { var achievement = new Achievements(model); Insert(achievement); var users = await(new UserInfoRepository()).GetAll(); _userAchievements.AddNewAchievementToUsers(achievement, users); }
public void Post([FromBody] AddAchievementViewModel model) { _achievementRepository.Insert(model); }