public JsonResult <IDtoOutObjects> All(DtoInLogout dtoInLogout) { if (ModelState.IsValid) { return(Json(_messageModel.GetAllMessages(dtoInLogout))); } DtoOutError error = new DtoOutError(); error.Exception = new ObjectIsNotValidException("SeenMessage"); error.Message = "Seenmessage is not valid"; return(Json((IDtoOutObjects)error)); }
public List <Message> GetAllMessages() { return(model.GetAllMessages()); }