public async Task <ActionResult <Meessages> > PostMeessages(Meessages meessages) { _context.Meessages.Add(meessages); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMeessages", new { id = meessages.MessageId }, meessages)); }
public async Task <IActionResult> PutMeessages(Guid id, Meessages meessages) { if (id != meessages.MessageId) { return(BadRequest()); } _context.Entry(meessages).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MeessagesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }