ServiceStack 4 Cookbook

Over 70 recipes to create net providers, construct message-based apps, and paintings with object-relational mapping

About This Book

  • Create quickly, testable, maintainable internet APIs utilizing the fully-featured framework in .NET
  • Integrate ServiceStack so as to add velocity and straightforwardness for your internet applications
  • Step-by-step recipes that concentrate on fixing real-world difficulties utilizing ServiceStack

Who This publication Is For

If you're a .NET developer who's searching for an easier method to construct prone, this can be the ebook for you. it's going to aid you write quick, maintainable APIs which are a excitement to exploit and preserve ranging from the database to the buyer and every little thing in-between.

What you are going to Learn

  • Quickly create quickly, testable, and maintainable net companies with ServiceStack
  • Integrate ServiceStack with current ASP.NET frameworks equivalent to MVC and SignalR
  • Render HTML utilizing Razor and MarkDown together with your ServiceStack services
  • Implement unit and integration checking out to your net API to reinforce caliber and compatibility
  • Work along with your SQL database of selection utilizing ServiceStack's ORM, OrmLite
  • Leverage the rate of Redis to scale your internet API

In Detail

Building internet prone is a posh activity as each language and framework has its personal structure, which isn't effortless to research. ServiceStack makes it effortless to create net companies and construct applications.

This publication covers quite a lot of themes from easy improvement and preliminary setup utilizing the ServiceStack framework to extra complex options akin to integration with different well known .NET frameworks. it is going to allow you to construct your providers and also will assist you confirm your internet API's caliber with step by step recipes that express you robust unit trying out and integration checking out styles. additionally, you will methods to entry your SQL database with velocity and ease utilizing ServiceStack's object-relational mapping framework, OrmLite.

Show description

Preview of ServiceStack 4 Cookbook PDF

Similar Education books

The Quality School

"This could be required interpreting by way of each college administator, each instructor, each board member and all college school keen on the educational of academics. there isn't any doubt that we have to squeeze all blame, all coerion and all feedback out of any people-related company. now not till we detect that faculties are in a humans enterprise do we ever have the capacity to make significant adjustments.

Radical: Fighting to Put Students First

In Radical, Michelle Rhee, a fearless and pioneering recommend for schooling reform, attracts on her personal existence tale and gives you her plan for larger American colleges. Rhee’s aim is to make sure that legislation, leaders, and rules are making students—not adults—our most sensible precedence, and he or she outlines concrete steps that might placed us on a dramatically varied direction.

Perfect Phrases for the TOEFL Speaking and Writing Sections (Perfect Phrases Series)

Excellent words to face out at the TOEFL-for the greater than 800,000 those that take the try To be authorized into so much North American undergraduate and graduate courses, foreign scholars needs to take and cross the attempt of English as a overseas Language. excellent words for the TOEFL conversing and Writing Sections supplies the entire words and most ordinarily used phrases you must excel on either the writing and conversing sections of the try.

Reading and Learning to Read (8th Edition)

Analyzing and studying to learn, 8/e is a highly-popular source that expertly prepares pre-service and in-service lecturers for today’s ever-changing literacy school room with its finished assurance of philosophies, educating ideas, and review practices. additionally, this booklet specializes in supporting lecturers enforce potent research-based techniques with suffering and various newbies; provides sensible purposes that have interaction scholars in new literacies and expertise purposes; and contours the overseas interpreting organization 2010 criteria for studying pros.

Extra resources for ServiceStack 4 Cookbook

Show sample text content

PopulateWith(tokens); } sign in the recent SteamAuthProvider category with the AuthFeature plugin, besides backing Sqlite IUserAuthRepository, as follows:var authProviders = new List(); var appSettings = new AppSettings(); authProviders. Add(new SteamAuthProvider(appSettings)); var authFeature = new AuthFeature( () => new AuthUserSession(), authProviders. ToArray()); this. Plugins. Add(authFeature); box. Register( new OrmLiteConnectionFactory( "~/App_Data/db. sqlite". MapHostAbsolutePath(), SqliteDialect. Provider)); box. Register( new OrmLiteAuthRepository( box. Resolve() )); box. Resolve(). InitSchema(); box. Register(new MemoryCacheClient()); within the _Layout. cshtml web page, create a login button and preview the consumer photo, as follows:

the subsequent screenshot indicates how your resultant monitor will glance: replace your internet. config dossier to specify RedirectUrl, CallbackUrl and ConsumerKey, so one can be your Steam APIKey: the way it works… even if OpenID is an older type of authentication, many websites nonetheless use it. ServiceStack's base category OpenIdOAuthProvider implements the plumbing for speaking with OpenID companies and permits extension issues to deal with the components which are assorted among various prone. If we didn't wish any of the main points from the Steam API, we might in simple terms need to offer APIKey, identify, and Realm for the authentication to paintings. Overriding the LoadUserAuthInfo technique supplies us the opportunity to replace the user's information from the exterior supplier, which to that end is Steam, deliver again updated details at the person, and current it in our software. replace particular token info, comparable to tokens. Items[AuthMetadataProvider. ProfileUrlKey], with info from the Steam companies permitting us to exploit present extension equipment like person. GetProfileUrl() from our Razor pages to make this constant throughout authentication prone. this is how our display takes care of acting the previous directions: The identify of the authentication supplier, which thus is Steam, specifies the place on our routes this supplier will hear for requests. The AuthFeature plugin registers those prone at /auth/{Name}.

Download PDF sample

Rated 4.56 of 5 – based on 10 votes