🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.comp.lang.csharp
Article #21193

Re: Procki w MVC 1.0 i LINQ

#21193
From: Pr0NET
Date: Wed, 02 Dec 2009 23:11
29 lines
2449 bytes
On Nov 26, 11:40 pm, Łukasz Kuryło <lsz...@gmail.com> wrote:
> > W MVC używa się procedur składowanych tak samo jak w WebForm'am, WPF
> > czy gdziekolwiek indziej, gdyż jest to tylko warstwa prezentacji.
>
> Z nazwaniem MVC ogólnie warstwą prezentacji chyba trochę przesadziłem.
> Normalnie wydzielam sobie domain model do osobnego projektu, a potem
> łączę go z warstwą prezentacji, w tym wypadku z widokami z MVC poprzez
> kontrolery.

Dzięki!

Doszedłem do czegoś takiego:

            public IQueryable<Book> Pokaz(int bookID)
            {
                int ? outputParameter = bookID;
               // bookID = 1;
                return from bookdetail in db.BookDetail(ref
outputParameter)
                       select db.BookDetail;
            }

na select mam monit:
Error	2	The type of the expression in the select clause is incorrect.
Type inference failed in the call to 'Select'.	F:\Documents\Visual
Studio 2008\Projects\book_014\TestBook\Models\BookRepository.cs

Wiesz może jak to obejść? Próbowałem już select
db.BookDetail.AsQueryable(); ale coś nie działa.
Technical Details
Message-ID: <694e50e1-3cca-4b17-a215-a41eb57c8d5c@m38g2000yqd.googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!feed.news.interia.pl!news.nask.pl!news.nask.org.pl!goblin1!goblin.stu.neva.ru!postnews.google.com!m38g2000yqd.googlegroups.com!not-for-mail
References: <c87af13e-23ef-433c-b35b-5d26ad8a212a@g26g2000yqe.googlegroups.com> <6f49f6e0-56ab-4ba6-becb-c4ec2e4bf2ec@m3g2000yqf.googlegroups.com> <7fb4fad8-93d8-4251-973b-434b1f13baac@a21g2000yqc.googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!feed.news.interia.pl!news.nask.pl!news.nask.org.pl!goblin1!goblin.stu.neva.ru!postnews.google.com!m38g2000yqd.googlegroups.com!not-for-mail
From: Pr0NET <bolkow@gmail.com>
Newsgroups: alt.pl.comp.lang.csharp
Subject: Re: Procki w MVC 1.0 i LINQ
Date: Wed, 2 Dec 2009 15:11:43 -0800 (PST)
Organization: http://groups.google.com
Lines: 32
Message-ID: <694e50e1-3cca-4b17-a215-a41eb57c8d5c@m38g2000yqd.googlegroups.com>
References: <c87af13e-23ef-433c-b35b-5d26ad8a212a@g26g2000yqe.googlegroups.com>  <6f49f6e0-56ab-4ba6-becb-c4ec2e4bf2ec@m3g2000yqf.googlegroups.com>  <7fb4fad8-93d8-4251-973b-434b1f13baac@a21g2000yqc.googlegroups.com>
NNTP-Posting-Host: 87.105.141.222
Mime-Version: 1.0
X-Trace: posting.google.com 1259795504 1101 127.0.0.1 (2 Dec 2009 23:11:44 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 2 Dec 2009 23:11:44 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: m38g2000yqd.googlegroups.com; posting-host=87.105.141.222;  posting-account=KAAXkAoAAACwuRoFEB6OpVg6R7ZjmItr
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.1.5)  Gecko/20091102 Firefox/3.5.5,gzip(gfe),gzip(gfe)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit