public Guid Create(Goal entity) { var user = _identityRepository.Query(identity => identity.Login == UserName).FirstOrDefault(i => true);//.Id; entity.IdentityId = user.Id; return(_repository.Create(entity)); }
public ActionResult Post(CreateGoalDTO param) { var goal = new Goal { Id = Guid.NewGuid(), Name = param.Name, Description = param.Description }; _goalRepository.Create(goal); return(Created("Goals", goal)); }
public async Task <long> CreateGoal(Goal goal) { goal = _goalRepository.Create(goal); await _unit.Commit(); await _feedEventService.GenerateFeedEvent(goal); await AssessGoalProgress(goal); await _unit.Commit(); return(goal.Id); }
public Goal Create(Goal goal) { goal = Repo.Create(goal); Unit.SaveChanges(); return(goal); }