public async Task<IHttpActionResult> Put(KindViewModel kind) { Kind newKind = new Kind() { Name = kind.Name, Group = CurrentGroup }; var existingKind = UnitOfWork.KindRepository.Search(kind.Name,"Group", true) .FirstOrDefault(k => k.Group.Id == CurrentGroup.Id); if (existingKind != null) { return Conflict(); } await UnitOfWork.KindRepository.Insert(newKind); return Ok(new KindViewModel() { Id = newKind.Id, Name = newKind.Name }); }
public async Task<IHttpActionResult> Post(KindViewModel kind) { throw new NotImplementedException(); }