Exemple #1
0
        public static AuthorVM GenerateAuthorVM(BookStoreContext db, int?id, bool success = false)
        {
            AuthorVM model = new AuthorVM
            {
                Author  = db.Authors.Find(id),
                Success = success,
            };

            return(model);
        }
Exemple #2
0
        public static AuthorVM GenerateAuthorVM(BookStoreContext db, bool success = false)
        {
            AuthorVM model = new AuthorVM
            {
                Author  = new Author(),
                Success = success,
            };

            return(model);
        }