public int Save(AuthorDto authorDto) { try { context.Authors.Add(authorDto.ToAuthorEntity()); context.SaveChanges(); return(1); } catch (Exception) { return(-1); } }