├── .gitattributes ├── Programming EF 2nd Edition ├── 2e Chapter 27 ASP.NET Apps │ ├── WebAppTests │ │ └── Test References │ │ │ └── Ch25WebForm.accessor │ ├── Ch27WebForm │ │ ├── Global.asax │ │ ├── assets │ │ │ ├── ok.png │ │ │ ├── DeleteHS.png │ │ │ ├── saveHS.png │ │ │ ├── AddTableHS.png │ │ │ ├── EditTableHS.png │ │ │ ├── Edit_UndoHS.png │ │ │ └── NewDocumentHS.png │ │ ├── Site.Master.cs │ │ ├── Account │ │ │ ├── Web.config │ │ │ ├── ChangePassword.aspx.cs │ │ │ └── ChangePasswordSuccess.aspx.cs │ │ └── About.aspx │ ├── MvcApplication1 │ │ ├── Global.asax │ │ └── Views │ │ │ ├── Shared │ │ │ ├── LogOnUserControl.ascx │ │ │ └── Error.aspx │ │ │ └── Home │ │ │ └── About.aspx │ ├── BreakAwayModel POCO │ │ ├── BAModel.zip │ │ ├── BAModel.Designer.cs │ │ └── App.Config │ ├── Repositories │ │ ├── Class1.cs │ │ └── Interfaces │ │ │ └── IEntityRepository.cs │ ├── MvcApplication1.Tests │ │ └── App.config │ ├── BreakAwayPOCOEntities │ │ └── Partial Classes Added in Chapter 10 │ │ │ └── Address.cs │ └── Local.testsettings ├── 2e Chapter 24 PI Tests Repository │ ├── POCOEFTests │ │ └── Test References │ │ │ └── Repositories.accessor │ ├── lint.db │ ├── Repositories │ │ ├── Class1.cs │ │ └── Interfaces │ │ │ └── IEntityRepository.cs │ ├── POCOState │ │ └── StateObject.cs │ ├── BreakAwayModel POCO │ │ └── BAModel.Designer.cs │ ├── BreakAwayPOCOEntities │ │ └── Partial Classes Added in Chapter 10 │ │ │ └── Address.cs │ ├── Local.testsettings │ └── RepositoryUI │ │ └── app.config ├── 2e Chapter 12 ASPNET Apps │ ├── Chapter12Dynamic │ │ ├── Global.asax │ │ ├── DynamicData │ │ │ ├── FieldTemplates │ │ │ │ ├── Children_Insert.ascx │ │ │ │ ├── Boolean_Edit.ascx │ │ │ │ ├── Boolean.ascx │ │ │ │ ├── Text.ascx │ │ │ │ ├── DateTime.ascx │ │ │ │ ├── Url.ascx │ │ │ │ ├── Children.ascx │ │ │ │ ├── Enumeration.ascx │ │ │ │ ├── EmailAddress.ascx │ │ │ │ ├── ManyToMany_Edit.ascx │ │ │ │ ├── ForeignKey.ascx │ │ │ │ ├── ManyToMany.ascx │ │ │ │ └── Children_Insert.ascx.cs │ │ │ ├── Content │ │ │ │ └── Images │ │ │ │ │ ├── Back.gif │ │ │ │ │ ├── plus.gif │ │ │ │ │ ├── PgLast.gif │ │ │ │ │ ├── PgNext.gif │ │ │ │ │ ├── PgPrev.gif │ │ │ │ │ ├── PgFirst.gif │ │ │ │ │ └── header_back.gif │ │ │ ├── Filters │ │ │ │ ├── Boolean.ascx │ │ │ │ ├── Enumeration.ascx │ │ │ │ └── ForeignKey.ascx │ │ │ └── web.config │ │ └── Site.master.cs │ ├── BreakAwayModelCh7 │ │ ├── Partial Classes Added in Chapter 10 │ │ │ └── Reservation.cs │ │ └── App.Config │ └── Chapter12EDSv1 │ │ ├── ContactsandCustomerInfo.aspx.cs │ │ └── WebForm1.aspx.cs ├── data │ ├── BreakAway_mdf SS2008.zip │ └── PROGRAMMINGEFDB1_mdf SS2008.zip ├── 2e Chapter 25 Code First CTP5 │ ├── CodeFirstConsole │ │ └── packages.config │ ├── CodeFirstPersistence │ │ └── packages.config │ └── CodeFirstClasses │ │ └── Workshop.cs ├── 2e PersistedStateEntry VB and C# │ └── CloudService1 │ │ ├── WCFServiceWebRole1 │ │ └── Service1.svc │ │ └── CloudService1 │ │ └── ServiceConfiguration.cscfg ├── 2e Chapter 18 WCF POCOs │ ├── Chapter18WCFService │ │ ├── CustomerService.svc │ │ ├── Web.Debug.config │ │ └── Web.Release.config │ ├── BreakAwayModel POCO │ │ ├── TextFile1.txt │ │ ├── BAModel.Designer.cs │ │ └── App.Config │ ├── Chapter18POCOState │ │ └── StateObject.cs │ ├── BreakAwayPOCOEntities │ │ ├── 2e Chapter 18 BreakAway T4 Template with Modifications for CSharp.zip │ │ └── Partial Classes Added in Chapter 10 │ │ │ └── Reservation.cs │ └── Chapter18ConsoleTestModel │ │ └── Service References │ │ └── POCOCustomerService │ │ └── CustomerService.disco ├── 2e Chapter 17 WCF EntityObjects │ ├── Chapter17WCFServices │ │ ├── CustomerService.svc │ │ ├── Web.Debug.config │ │ └── Web.Release.config │ ├── Chapter17ConsoleApp │ │ └── Service References │ │ │ └── CustomerService │ │ │ └── CustomerService.disco │ └── BreakAwayModel │ │ ├── Partial Classes Added in Chapter 10 │ │ └── Reservation.cs │ │ └── App.Config ├── 2ePersistedStateEntry │ ├── ConcurrencyTests.xml │ ├── Properties │ │ └── Settings.settings │ └── TestFriends.cs ├── 2e Chapter13SimplePOCO │ ├── DAL.cs │ ├── Model1.Designer.cs │ └── Local.testsettings ├── 2e Chapter 18 SelfTrackingEntities │ └── 2e Chapter 18 SelfTrackingEntities │ │ ├── Ch16 CustomerSTEService │ │ ├── Service1.svc │ │ ├── Web.Debug.config │ │ └── Web.Release.config │ │ ├── BreakAwayModel │ │ ├── BAModel.zip │ │ └── BAModel.Designer.cs │ │ ├── Ch16STEConsoleApp │ │ └── Service References │ │ │ └── STECustomerService │ │ │ └── Service1.disco │ │ └── ReadMe.txt ├── 2e Sample Database Ch 2 thru 6 SQL Script │ └── CreateProgrammingEFDB1.sql ├── 2e Chapter 26 Layered WPF │ ├── BAGABridge │ │ └── DataBridge.cs │ ├── WPFUI │ │ ├── Properties │ │ │ └── Settings.settings │ │ ├── Window1.xaml │ │ ├── App.xaml │ │ └── App.xaml.cs │ ├── BreakAwayModel POCO │ │ ├── BAModel.Designer.cs │ │ └── App.Config │ └── BreakAwayPOCOEntities │ │ └── Partial Classes Added in Chapter 10 │ │ └── Address.cs ├── 2e Chapter 9 WPF │ ├── Chapter 9 WPF │ │ ├── Properties │ │ │ └── Settings.settings │ │ ├── Window1.xaml │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ └── App.config │ └── BreakAwayModel │ │ └── App.Config ├── 2e Chapter 20 Compiled Queries │ ├── Console App │ │ └── Properties │ │ │ └── Settings.settings │ └── BreakAwayModel │ │ ├── Partial Classes Added in Chapter 10 │ │ └── Reservation.cs │ │ └── App.Config ├── Sample Models Chapter 2 through 7 │ └── ReadMe.txt ├── 2e Chapter 9 Windows Forms │ ├── Chapter9WindowsForm │ │ ├── Properties │ │ │ └── Settings.settings │ │ └── App.config │ └── BreakAwayModel │ │ └── App.Config ├── 2e ExtensionMethods │ └── ReadMe.txt ├── 2e Chapter 11 Customization │ ├── BreakAwayModel │ │ ├── Partial Classes Added in Chapter 11 │ │ │ └── Reservation.cs │ │ └── App.Config │ └── Chapter11Customization │ │ └── App.config ├── 2e Chapter 20 Perf Threading Etc │ ├── BreakAwayModel │ │ └── Partial Classes Added in Chapter 10 │ │ │ └── Reservation.cs │ └── Chapter20Threading │ │ └── app.config └── 2e Chapter 21 ObjectStateManager │ ├── BreakAwayModel │ └── Partial Classes Added in Chapter 10 │ │ └── Reservation.cs │ └── ObjectStateVisualizerCS │ └── VisualizerForm.cs ├── Programming EF Code First ├── chapter5 │ ├── Chapter 5 VB.zip │ ├── Chapter 5 VB │ │ ├── Fluent │ │ │ ├── DataAccess │ │ │ │ ├── packages.config │ │ │ │ ├── ReservationConfiguration.vb │ │ │ │ ├── AddressConfiguration.vb │ │ │ │ ├── ActivityConfiguration.vb │ │ │ │ └── InternetSpecialConfiguration.vb │ │ │ ├── BreakAwayConsole │ │ │ │ └── packages.config │ │ │ └── Model │ │ │ │ ├── Measurement.vb │ │ │ │ ├── Resort.vb │ │ │ │ ├── Activity.vb │ │ │ │ ├── Hostel.vb │ │ │ │ ├── PersonalInfo.vb │ │ │ │ ├── PersonPhoto.vb │ │ │ │ ├── Address.vb │ │ │ │ ├── Reservation.vb │ │ │ │ ├── Trip.vb │ │ │ │ └── InternetSpecial.vb │ │ └── Data Annotations │ │ │ ├── Model │ │ │ ├── packages.config │ │ │ ├── Measurement.vb │ │ │ ├── Hostel.vb │ │ │ ├── Resort.vb │ │ │ ├── Reservation.vb │ │ │ ├── Activity.vb │ │ │ ├── PersonalInfo.vb │ │ │ ├── PersonPhoto.vb │ │ │ └── Trip.vb │ │ │ ├── DataAccess │ │ │ ├── packages.config │ │ │ └── BreakAwayContext.vb │ │ │ └── BreakAwayConsole │ │ │ └── packages.config │ ├── Chapter5 CSharp │ │ ├── BAGA_FluentAPI │ │ │ ├── DataAccess │ │ │ │ ├── packages.config │ │ │ │ ├── ReservationConfiguration.cs │ │ │ │ ├── AddressConfiguration.cs │ │ │ │ └── ActivityConfiguration.cs │ │ │ ├── BreakAwayConsole │ │ │ │ └── packages.config │ │ │ └── Model │ │ │ │ ├── Measurement.cs │ │ │ │ ├── Resort.cs │ │ │ │ ├── Hostel.cs │ │ │ │ ├── PersonalInfo.cs │ │ │ │ ├── Activity.cs │ │ │ │ ├── PersonPhoto.cs │ │ │ │ ├── Address.cs │ │ │ │ ├── Reservation.cs │ │ │ │ ├── Trip.cs │ │ │ │ └── InternetSpecial.cs │ │ └── BAGA_DataAnnotations │ │ │ ├── Model │ │ │ ├── packages.config │ │ │ ├── Measurement.cs │ │ │ ├── Hostel.cs │ │ │ ├── Resort.cs │ │ │ ├── PersonalInfo.cs │ │ │ ├── Activity.cs │ │ │ ├── Reservation.cs │ │ │ └── PersonPhoto.cs │ │ │ ├── DataAccess │ │ │ ├── packages.config │ │ │ └── BreakAwayContext.cs │ │ │ └── BreakAwayConsole │ │ │ └── packages.config │ └── readme.txt ├── chapter3 │ ├── Chapter 3 VB │ │ ├── Fluent │ │ │ ├── DataAccess │ │ │ │ ├── packages.config │ │ │ │ ├── AddressConfiguration.vb │ │ │ │ ├── PersonConfiguration.vb │ │ │ │ └── DestinationConfiguration.vb │ │ │ ├── BreakAwayConsole │ │ │ │ └── packages.config │ │ │ └── Model │ │ │ │ ├── Measurement.vb │ │ │ │ ├── PersonalInfo.vb │ │ │ │ ├── Trip.vb │ │ │ │ ├── Address.vb │ │ │ │ ├── Destination.vb │ │ │ │ └── Lodging.vb │ │ └── Data Annotations │ │ │ ├── Model │ │ │ ├── packages.config │ │ │ ├── Measurement.vb │ │ │ ├── PersonalInfo.vb │ │ │ ├── Address.vb │ │ │ ├── Trip.vb │ │ │ └── Lodging.vb │ │ │ ├── DataAccess │ │ │ ├── packages.config │ │ │ └── BreakAwayContext.vb │ │ │ └── BreakAwayConsole │ │ │ └── packages.config │ ├── Chapter3 │ │ ├── BAGA_DataAnnotations │ │ │ ├── Model │ │ │ │ ├── packages.config │ │ │ │ ├── Measurement.cs │ │ │ │ ├── PersonalInfo.cs │ │ │ │ ├── Address.cs │ │ │ │ └── Trip.cs │ │ │ ├── DataAccess │ │ │ │ ├── packages.config │ │ │ │ └── BreakAwayContext.cs │ │ │ └── BreakAwayConsole │ │ │ │ └── packages.config │ │ └── BAGA_FluentAPI │ │ │ ├── DataAccess │ │ │ ├── packages.config │ │ │ ├── AddressConfiguration.cs │ │ │ └── PersonConfiguration.cs │ │ │ ├── BreakAwayConsole │ │ │ └── packages.config │ │ │ └── Model │ │ │ ├── Measurement.cs │ │ │ ├── PersonalInfo.cs │ │ │ ├── Address.cs │ │ │ ├── Trip.cs │ │ │ ├── Lodging.cs │ │ │ └── Destination.cs │ └── readme.txt ├── chapter4 │ ├── Chapter 4 VB │ │ ├── Fluent │ │ │ ├── DataAccess │ │ │ │ ├── packages.config │ │ │ │ ├── AddressConfiguration.vb │ │ │ │ ├── ActivityConfiguration.vb │ │ │ │ ├── PersonConfiguration.vb │ │ │ │ ├── PersonPhotoConfiguration.vb │ │ │ │ ├── InternetSpecialConfiguration.vb │ │ │ │ └── DestinationConfiguration.vb │ │ │ ├── BreakAwayConsole │ │ │ │ └── packages.config │ │ │ └── Model │ │ │ │ ├── Measurement.vb │ │ │ │ ├── Activity.vb │ │ │ │ ├── PersonalInfo.vb │ │ │ │ ├── PersonPhoto.vb │ │ │ │ ├── Address.vb │ │ │ │ ├── Trip.vb │ │ │ │ ├── Destination.vb │ │ │ │ └── InternetSpecial.vb │ │ └── Data Annotations │ │ │ ├── Model │ │ │ ├── packages.config │ │ │ ├── Measurement.vb │ │ │ ├── Activity.vb │ │ │ ├── PersonalInfo.vb │ │ │ ├── PersonPhoto.vb │ │ │ ├── Address.vb │ │ │ └── Trip.vb │ │ │ ├── DataAccess │ │ │ ├── packages.config │ │ │ └── BreakAwayContext.vb │ │ │ └── BreakAwayConsole │ │ │ └── packages.config │ ├── Chapter4 │ │ ├── BAGA_DataAnnotations │ │ │ ├── Model │ │ │ │ ├── packages.config │ │ │ │ ├── Measurement.cs │ │ │ │ ├── PersonalInfo.cs │ │ │ │ ├── Activity.cs │ │ │ │ ├── PersonPhoto.cs │ │ │ │ └── Address.cs │ │ │ ├── DataAccess │ │ │ │ ├── packages.config │ │ │ │ └── BreakAwayContext.cs │ │ │ └── BreakAwayConsole │ │ │ │ └── packages.config │ │ └── BAGA_FluentAPI │ │ │ ├── DataAccess │ │ │ ├── packages.config │ │ │ ├── AddressConfiguration.cs │ │ │ ├── PersonConfiguration.cs │ │ │ ├── ActivityConfiguration.cs │ │ │ └── PersonPhotoConfiguration.cs │ │ │ ├── BreakAwayConsole │ │ │ └── packages.config │ │ │ └── Model │ │ │ ├── Measurement.cs │ │ │ ├── PersonalInfo.cs │ │ │ ├── Activity.cs │ │ │ ├── PersonPhoto.cs │ │ │ ├── Address.cs │ │ │ ├── Destination.cs │ │ │ ├── Trip.cs │ │ │ └── InternetSpecial.cs │ └── readme.txt ├── chapter2 │ ├── Chapter 2 VB │ │ ├── Data Annotations │ │ │ ├── Model │ │ │ │ ├── packages.config │ │ │ │ ├── Lodging.vb │ │ │ │ └── Destination.vb │ │ │ ├── DataAccess │ │ │ │ ├── packages.config │ │ │ │ └── BreakAwayContext.vb │ │ │ └── BreakAwayConsole │ │ │ │ └── packages.config │ │ └── Fluent API │ │ │ ├── DataAccess │ │ │ ├── packages.config │ │ │ ├── LodgingConfiguration.vb │ │ │ └── DestinationConfiguration.vb │ │ │ ├── BreakAwayConsole │ │ │ └── packages.config │ │ │ └── Model │ │ │ ├── Lodging.vb │ │ │ └── Destination.vb │ ├── Chapter2 │ │ ├── BAGA_DataAnnotations │ │ │ ├── Model │ │ │ │ ├── packages.config │ │ │ │ └── Lodging.cs │ │ │ ├── DataAccess │ │ │ │ ├── packages.config │ │ │ │ └── BreakAwayContext.cs │ │ │ └── BreakAwayConsole │ │ │ │ └── packages.config │ │ └── BAGA_FluentAPI │ │ │ ├── DataAccess │ │ │ ├── packages.config │ │ │ └── LodgingConfiguration.cs │ │ │ ├── BreakAwayConsole │ │ │ └── packages.config │ │ │ └── Model │ │ │ ├── Lodging.cs │ │ │ └── Destination.cs │ └── readme.txt └── chapter6 │ ├── Chapter6 │ ├── BAGA_DataAnnotations │ │ ├── Model │ │ │ ├── packages.config │ │ │ ├── Measurement.cs │ │ │ ├── Hostel.cs │ │ │ ├── Resort.cs │ │ │ ├── PersonalInfo.cs │ │ │ ├── Activity.cs │ │ │ ├── Reservation.cs │ │ │ └── PersonPhoto.cs │ │ ├── DataAccess │ │ │ └── packages.config │ │ └── BreakAwayConsole │ │ │ ├── App.config │ │ │ └── packages.config │ ├── BAGA_FluentAPI │ │ ├── DataAccess │ │ │ ├── packages.config │ │ │ ├── ReservationConfiguration.cs │ │ │ ├── AddressConfiguration.cs │ │ │ └── ActivityConfiguration.cs │ │ ├── Model │ │ │ ├── Measurement.cs │ │ │ ├── Resort.cs │ │ │ ├── Hostel.cs │ │ │ ├── PersonalInfo.cs │ │ │ ├── Activity.cs │ │ │ ├── PersonPhoto.cs │ │ │ ├── Address.cs │ │ │ ├── Reservation.cs │ │ │ ├── Trip.cs │ │ │ └── InternetSpecial.cs │ │ └── BreakAwayConsole │ │ │ ├── App.config │ │ │ └── packages.config │ ├── Chapter 6 VB PepLluis.zip │ └── Chapter 6 VB │ │ ├── Fluent │ │ ├── DataAccess │ │ │ ├── packages.config │ │ │ ├── ReservationConfiguration.vb │ │ │ ├── AddressConfiguration.vb │ │ │ ├── ActivityConfiguration.vb │ │ │ └── InternetSpecialConfiguration.vb │ │ ├── Model │ │ │ ├── Measurement.vb │ │ │ ├── Resort.vb │ │ │ ├── Activity.vb │ │ │ ├── Hostel.vb │ │ │ ├── PersonalInfo.vb │ │ │ ├── PersonPhoto.vb │ │ │ ├── Address.vb │ │ │ ├── Reservation.vb │ │ │ ├── Trip.vb │ │ │ └── InternetSpecial.vb │ │ └── BreakAwayConsole │ │ │ ├── app.config │ │ │ └── packages.config │ │ └── DataAnnotations │ │ ├── Model │ │ ├── packages.config │ │ ├── Measurement.vb │ │ ├── Hostel.vb │ │ ├── Resort.vb │ │ ├── Reservation.vb │ │ ├── Activity.vb │ │ ├── PersonalInfo.vb │ │ └── PersonPhoto.vb │ │ ├── DataAccess │ │ └── packages.config │ │ └── BreakAwayConsole │ │ ├── app.config │ │ └── packages.config │ └── readme.txt └── Programing EF DbContext ├── StartingSolution ├── Model │ ├── packages.config │ ├── Measurement.cs │ ├── Hostel.cs │ ├── Resort.cs │ ├── PersonalInfo.cs │ ├── Activity.cs │ ├── Payment.cs │ ├── PersonPhoto.cs │ ├── App.config │ └── Address.cs ├── DataAccess │ └── packages.config └── BreakAwayConsole │ ├── packages.config │ └── App.config ├── AfterCompletingChapter2 ├── Model │ ├── packages.config │ ├── Measurement.cs │ ├── Hostel.cs │ ├── Resort.cs │ ├── PersonalInfo.cs │ ├── Activity.cs │ ├── Payment.cs │ ├── PersonPhoto.cs │ └── App.config ├── DataAccess │ └── packages.config └── BreakAwayConsole │ ├── packages.config │ └── App.config ├── AfterCompletingChapter3 ├── Model │ ├── packages.config │ ├── Measurement.cs │ ├── Hostel.cs │ ├── Resort.cs │ ├── PersonalInfo.cs │ ├── Activity.cs │ ├── Payment.cs │ ├── PersonPhoto.cs │ └── App.config ├── DataAccess │ └── packages.config └── BreakAwayConsole │ ├── packages.config │ └── App.config ├── AfterCompletingChapter4 ├── Model │ ├── packages.config │ ├── Measurement.cs │ ├── Hostel.cs │ ├── Resort.cs │ ├── IObjectWithState.cs │ ├── PersonalInfo.cs │ ├── Activity.cs │ ├── Payment.cs │ ├── PersonPhoto.cs │ └── App.config ├── DataAccess │ └── packages.config └── BreakAwayConsole │ ├── packages.config │ └── App.config ├── AfterCompletingChapter5 ├── Model │ ├── packages.config │ ├── Measurement.cs │ ├── Hostel.cs │ ├── Resort.cs │ ├── IObjectWithState.cs │ ├── PersonalInfo.cs │ ├── Activity.cs │ ├── Payment.cs │ ├── PersonPhoto.cs │ └── App.config ├── DataAccess │ └── packages.config └── BreakAwayConsole │ ├── packages.config │ └── App.config ├── AfterCompletingChapter6 ├── Model │ ├── packages.config │ ├── Measurement.cs │ ├── Hostel.cs │ ├── Resort.cs │ ├── IObjectWithState.cs │ ├── PersonalInfo.cs │ ├── Activity.cs │ ├── Payment.cs │ ├── PersonPhoto.cs │ └── App.config ├── DataAccess │ └── packages.config └── BreakAwayConsole │ ├── packages.config │ └── App.config ├── AfterCompletingChapter7 ├── Model │ ├── packages.config │ ├── Measurement.cs │ ├── Hostel.cs │ ├── Resort.cs │ ├── IObjectWithState.cs │ ├── PersonalInfo.cs │ ├── Activity.cs │ ├── PersonPhoto.cs │ └── App.config ├── DataAccess │ └── packages.config └── BreakAwayConsole │ ├── packages.config │ └── App.config └── AfterCompletingChapter8 ├── Model ├── packages.config ├── Measurement.cs ├── Hostel.cs ├── Resort.cs ├── IObjectWithState.cs ├── PersonalInfo.cs ├── Activity.cs ├── PersonPhoto.cs └── App.config ├── Tests ├── packages.config └── App.config ├── DataAccess ├── packages.config ├── ReservationDbSet.cs ├── SalesContext.cs └── BaseContext.cs ├── BreakAwayConsole ├── packages.config └── App.config └── Local.testsettings /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/WebAppTests/Test References/Ch25WebForm.accessor: -------------------------------------------------------------------------------- 1 | Ch25WebForm.dll 2 | Desktop 3 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 24 PI Tests Repository/POCOEFTests/Test References/Repositories.accessor: -------------------------------------------------------------------------------- 1 | Repositories.dll 2 | Desktop 3 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Ch25WebForm.Global" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Language="C#" CodeBehind="Global.asax.cs" Inherits="Chapter12Dynamic.Global" %> 2 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF Code First/chapter5/Chapter 5 VB.zip -------------------------------------------------------------------------------- /Programing EF DbContext/StartingSolution/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/MvcApplication1/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="MvcApplication1.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter2/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter3/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter4/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter5/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter6/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter7/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/Tests/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/StartingSolution/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/data/BreakAway_mdf SS2008.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/data/BreakAway_mdf SS2008.zip -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter2/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter3/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter4/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter5/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter6/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter7/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/StartingSolution/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter2/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter3/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter4/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter5/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter6/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter7/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 25 Code First CTP5/CodeFirstConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/data/PROGRAMMINGEFDB1_mdf SS2008.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/data/PROGRAMMINGEFDB1_mdf SS2008.zip -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Fluent/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 25 Code First CTP5/CodeFirstPersistence/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter 2 VB/Data Annotations/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter 2 VB/Fluent API/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter2/BAGA_DataAnnotations/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter2/BAGA_FluentAPI/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Data Annotations/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Fluent/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_DataAnnotations/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_FluentAPI/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Data Annotations/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_DataAnnotations/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_FluentAPI/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Data Annotations/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_DataAnnotations/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 24 PI Tests Repository/lint.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 24 PI Tests Repository/lint.db -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e PersistedStateEntry VB and C#/CloudService1/WCFServiceWebRole1/Service1.svc: -------------------------------------------------------------------------------- 1 | <%@ ServiceHost Language="C#" Debug="true" Service="WCFServiceWebRole1.Service1" CodeBehind="Service1.svc.cs" %> -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter 2 VB/Data Annotations/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter 2 VB/Fluent API/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter2/BAGA_DataAnnotations/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter2/BAGA_FluentAPI/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Data Annotations/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_DataAnnotations/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_FluentAPI/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Data Annotations/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_DataAnnotations/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_FluentAPI/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Data Annotations/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_FluentAPI/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_DataAnnotations/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB PepLluis.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF Code First/chapter6/Chapter6/Chapter 6 VB PepLluis.zip -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/StartingSolution/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 WCF POCOs/Chapter18WCFService/CustomerService.svc: -------------------------------------------------------------------------------- 1 | <%@ ServiceHost Language="C#" Debug="true" Service="Chapter18WCFServicePOCO.CustomerService" CodeBehind="CustomerService.svc.cs" %> -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter 2 VB/Data Annotations/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter2/BAGA_DataAnnotations/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Data Annotations/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_DataAnnotations/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Data Annotations/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_DataAnnotations/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Data Annotations/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_DataAnnotations/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/DataAnnotations/Model/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 17 WCF EntityObjects/Chapter17WCFServices/CustomerService.svc: -------------------------------------------------------------------------------- 1 | <%@ ServiceHost Language="C#" Debug="true" Service="Chapter17WCFServices.CustomerService" CodeBehind="CustomerService.svc.cs" %> -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 25 Code First CTP5/CodeFirstClasses/Workshop.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace CodeFirstClasses 4 | { 5 | public class Workshop : Session 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_DataAnnotations/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_FluentAPI/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/DataAnnotations/DataAccess/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter2/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter3/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter4/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter5/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter6/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter7/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_DataAnnotations/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/assets/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/assets/ok.png -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2ePersistedStateEntry/ConcurrencyTests.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ConcurrencyTests 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Fluent/Model/Measurement.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Measurement 3 | Public Property Reading() As Decimal 4 | Public Property Units() As String 5 | End Class 6 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/Model/Measurement.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Measurement 3 | Public Property Reading() As Decimal 4 | Public Property Units() As String 5 | End Class 6 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/Model/Measurement.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Measurement 3 | Public Property Reading() As Decimal 4 | Public Property Units() As String 5 | End Class 6 | End Namespace -------------------------------------------------------------------------------- /Programing EF DbContext/StartingSolution/Model/Hostel.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Hostel : Lodging 4 | { 5 | public int MaxPersonsPerRoom { get; set; } 6 | public bool PrivateRoomsAvailable { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_FluentAPI/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_FluentAPI/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/FieldTemplates/Children_Insert.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" CodeBehind="Children_Insert.ascx.cs" Inherits="Chapter12Dynamic.Children_InsertField" %> 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/BreakAwayModel POCO/BAModel.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/BreakAwayModel POCO/BAModel.zip -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/assets/DeleteHS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/assets/DeleteHS.png -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/assets/saveHS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/assets/saveHS.png -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Data Annotations/Model/Measurement.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Measurement 3 | Public Property Reading() As Decimal 4 | Public Property Units() As String 5 | End Class 6 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_DataAnnotations/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Data Annotations/Model/Measurement.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Measurement 3 | Public Property Reading() As Decimal 4 | Public Property Units() As String 5 | End Class 6 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_DataAnnotations/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Data Annotations/Model/Measurement.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Measurement 3 | Public Property Reading() As Decimal 4 | Public Property Units() As String 5 | End Class 6 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_FluentAPI/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_DataAnnotations/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/Model/Measurement.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Measurement 3 | Public Property Reading() As Decimal 4 | Public Property Units() As String 5 | End Class 6 | End Namespace -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter2/Model/Hostel.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Hostel : Lodging 4 | { 5 | public int MaxPersonsPerRoom { get; set; } 6 | public bool PrivateRoomsAvailable { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter3/Model/Hostel.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Hostel : Lodging 4 | { 5 | public int MaxPersonsPerRoom { get; set; } 6 | public bool PrivateRoomsAvailable { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter4/Model/Hostel.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Hostel : Lodging 4 | { 5 | public int MaxPersonsPerRoom { get; set; } 6 | public bool PrivateRoomsAvailable { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter5/Model/Hostel.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Hostel : Lodging 4 | { 5 | public int MaxPersonsPerRoom { get; set; } 6 | public bool PrivateRoomsAvailable { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter6/Model/Hostel.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Hostel : Lodging 4 | { 5 | public int MaxPersonsPerRoom { get; set; } 6 | public bool PrivateRoomsAvailable { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter7/Model/Hostel.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Hostel : Lodging 4 | { 5 | public int MaxPersonsPerRoom { get; set; } 6 | public bool PrivateRoomsAvailable { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/Model/Hostel.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Hostel : Lodging 4 | { 5 | public int MaxPersonsPerRoom { get; set; } 6 | public bool PrivateRoomsAvailable { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/assets/AddTableHS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/assets/AddTableHS.png -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter13SimplePOCO/DAL.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Chapter13SimplePOCO 7 | { 8 | class DAL 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_DataAnnotations/Model/Measurement.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Measurement 4 | { 5 | public decimal Reading { get; set; } 6 | public string Units { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/assets/EditTableHS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/assets/EditTableHS.png -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/assets/Edit_UndoHS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/assets/Edit_UndoHS.png -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/assets/NewDocumentHS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/assets/NewDocumentHS.png -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/Model/Resort.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Resort : Lodging 4 | { 5 | public string Entertainment { get; set; } 6 | public string Activities { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/DataAnnotations/Model/Measurement.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Measurement 3 | Public Property Reading() As Decimal 4 | Public Property Units() As String 5 | End Class 6 | End Namespace -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 SelfTrackingEntities/2e Chapter 18 SelfTrackingEntities/Ch16 CustomerSTEService/Service1.svc: -------------------------------------------------------------------------------- 1 | <%@ ServiceHost Language="C#" Debug="true" Service="Ch16_CustomerSTEService.CustomerSTEService" CodeBehind="Service1.svc.cs" %> -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_FluentAPI/Model/Resort.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Resort : Lodging 4 | { 5 | public string Entertainment { get; set; } 6 | public string Activities { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/BreakAwayConsole/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/Model/Hostel.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Hostel : Lodging 4 | { 5 | public int MaxPersonsPerRoom { get; set; } 6 | public bool PrivateRoomsAvailable { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Sample Database Ch 2 thru 6 SQL Script/CreateProgrammingEFDB1.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Sample Database Ch 2 thru 6 SQL Script/CreateProgrammingEFDB1.sql -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/Model/Resort.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Resort 3 | Inherits Lodging 4 | Public Property Entertainment() As String 5 | Public Property Activities() As String 6 | End Class 7 | End Namespace 8 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_FluentAPI/Model/Hostel.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Hostel : Lodging 4 | { 5 | public int MaxPersonsPerRoom { get; set; } 6 | public bool PrivateRoomsAvailable { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_DataAnnotations/BreakAwayConsole/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_DataAnnotations/Model/Hostel.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Hostel : Lodging 4 | { 5 | public int MaxPersonsPerRoom { get; set; } 6 | public bool PrivateRoomsAvailable { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/BreakAwayConsole/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 26 Layered WPF/BAGABridge/DataBridge.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BAGABridge 7 | { 8 | class DataBridge 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_DataAnnotations/Model/Hostel.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Hostel : Lodging 4 | { 5 | public int MaxPersonsPerRoom { get; set; } 6 | public bool PrivateRoomsAvailable { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/Model/Activity.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Activity 3 | Public Property ActivityId() As Integer 4 | Public Property Name() As String 5 | Public Property Trips() As List(Of Trip) 6 | End Class 7 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/Model/Activity.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Activity 3 | Public Property ActivityId() As Integer 4 | Public Property Name() As String 5 | Public Property Trips() As List(Of Trip) 6 | End Class 7 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/Model/Hostel.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Hostel 3 | Inherits Lodging 4 | Public Property MaxPersonsPerRoom() As Integer 5 | Public Property PrivateRoomsAvailable() As Boolean 6 | End Class 7 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/DataAnnotations/BreakAwayConsole/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/Model/Resort.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Resort 3 | Inherits Lodging 4 | Public Property Entertainment() As String 5 | Public Property Activities() As String 6 | End Class 7 | End Namespace 8 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Content/Images/Back.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Content/Images/Back.gif -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Content/Images/plus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Content/Images/plus.gif -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/FieldTemplates/Boolean_Edit.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" CodeBehind="Boolean_Edit.ascx.cs" Inherits="Chapter12Dynamic.Boolean_EditField" %> 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Repositories/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | 7 | namespace BAGA.Repositories 8 | { 9 | public class Class1 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Data Annotations/Model/Hostel.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Hostel 3 | Inherits Lodging 4 | Public Property MaxPersonsPerRoom() As Integer 5 | Public Property PrivateRoomsAvailable() As Boolean 6 | End Class 7 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_DataAnnotations/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/Model/Activity.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Activity 3 | Public Property ActivityId() As Integer 4 | Public Property Name() As String 5 | Public Property Trips() As List(Of Trip) 6 | End Class 7 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/Model/Hostel.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Hostel 3 | Inherits Lodging 4 | Public Property MaxPersonsPerRoom() As Integer 5 | Public Property PrivateRoomsAvailable() As Boolean 6 | End Class 7 | End Namespace -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Content/Images/PgLast.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Content/Images/PgLast.gif -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Content/Images/PgNext.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Content/Images/PgNext.gif -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Content/Images/PgPrev.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Content/Images/PgPrev.gif -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/FieldTemplates/Boolean.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" CodeBehind="Boolean.ascx.cs" Inherits="Chapter12Dynamic.BooleanField" %> 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/FieldTemplates/Text.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" CodeBehind="Text.ascx.cs" Inherits="Chapter12Dynamic.TextField" %> 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/DataAnnotations/BreakAwayConsole/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Content/Images/PgFirst.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Content/Images/PgFirst.gif -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 24 PI Tests Repository/Repositories/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | 7 | namespace BAGA.Repositories 8 | { 9 | public class Class1 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/DataAnnotations/Model/Hostel.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Hostel 3 | Inherits Lodging 4 | Public Property MaxPersonsPerRoom() As Integer 5 | Public Property PrivateRoomsAvailable() As Boolean 6 | End Class 7 | End Namespace -------------------------------------------------------------------------------- /Programing EF DbContext/StartingSolution/Model/Resort.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | public class Resort : Lodging 6 | { 7 | public string Entertainment { get; set; } 8 | public string Activities { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Content/Images/header_back.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Content/Images/header_back.gif -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 26 Layered WPF/WPFUI/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 9 WPF/Chapter 9 WPF/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Fluent/Model/PersonalInfo.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class PersonalInfo 3 | Public Property Weight() As Measurement 4 | Public Property Height() As Measurement 5 | Public Property DietryRestrictions() As String 6 | End Class 7 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/Model/PersonalInfo.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class PersonalInfo 3 | Public Property Weight() As Measurement 4 | Public Property Height() As Measurement 5 | Public Property DietryRestrictions() As String 6 | End Class 7 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/Model/PersonalInfo.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class PersonalInfo 3 | Public Property Weight() As Measurement 4 | Public Property Height() As Measurement 5 | Public Property DietryRestrictions() As String 6 | End Class 7 | End Namespace -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/FieldTemplates/DateTime.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" CodeBehind="DateTime.ascx.cs" Inherits="Chapter12Dynamic.DateTimeField" %> 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 WCF POCOs/BreakAwayModel POCO/TextFile1.txt: -------------------------------------------------------------------------------- 1 | edmgen /mode:ViewGeneration /inssdl:f:\models\BAModel.ssdl /incsdl:f:\models\BAModel.csdl /inmsl:f:\models\BAModel.msl /p:"F:\_EF2_Samples_For_Deploy\2e Chapter 18 WCF POCOs\BreakAwayModel POCO\BreakAwayModelPOCO.csproj" -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 20 Compiled Queries/Console App/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_FluentAPI/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class PersonalInfo 4 | { 5 | public Measurement Weight { get; set; } 6 | public Measurement Height { get; set; } 7 | public string DietryRestrictions { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_FluentAPI/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class PersonalInfo 4 | { 5 | public Measurement Weight { get; set; } 6 | public Measurement Height { get; set; } 7 | public string DietryRestrictions { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class PersonalInfo 4 | { 5 | public Measurement Weight { get; set; } 6 | public Measurement Height { get; set; } 7 | public string DietryRestrictions { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/Model/PersonalInfo.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class PersonalInfo 3 | Public Property Weight() As Measurement 4 | Public Property Height() As Measurement 5 | Public Property DietryRestrictions() As String 6 | End Class 7 | End Namespace -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter2/Model/Resort.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | public class Resort : Lodging 6 | { 7 | public string Entertainment { get; set; } 8 | public string Activities { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter3/Model/Resort.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | public class Resort : Lodging 6 | { 7 | public string Entertainment { get; set; } 8 | public string Activities { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter4/Model/Resort.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | public class Resort : Lodging 6 | { 7 | public string Entertainment { get; set; } 8 | public string Activities { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter5/Model/Resort.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | public class Resort : Lodging 6 | { 7 | public string Entertainment { get; set; } 8 | public string Activities { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter6/Model/Resort.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | public class Resort : Lodging 6 | { 7 | public string Entertainment { get; set; } 8 | public string Activities { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter7/Model/Resort.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | public class Resort : Lodging 6 | { 7 | public string Entertainment { get; set; } 8 | public string Activities { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/Model/Resort.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | public class Resort : Lodging 6 | { 7 | public string Entertainment { get; set; } 8 | public string Activities { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/FieldTemplates/Url.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" CodeBehind="Url.ascx.cs" Inherits="Chapter12Dynamic.UrlField" %> 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_FluentAPI/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class PersonalInfo 4 | { 5 | public Measurement Weight { get; set; } 6 | public Measurement Height { get; set; } 7 | public string DietryRestrictions { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/FieldTemplates/Children.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" CodeBehind="Children.ascx.cs" Inherits="Chapter12Dynamic.ChildrenField" %> 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/FieldTemplates/Enumeration.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" CodeBehind="Enumeration.ascx.cs" Inherits="Chapter12Dynamic.EnumerationField" %> 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/DataAccess/ReservationConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity.ModelConfiguration; 2 | using Model; 3 | 4 | namespace DataAccess 5 | { 6 | public class ReservationConfiguration : EntityTypeConfiguration 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/Model/PersonPhoto.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class PersonPhoto 3 | Public Property PersonId() As Integer 4 | Public Property Photo() As Byte() 5 | Public Property Caption() As String 6 | Public Property PhotoOf() As Person 7 | End Class 8 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/Model/PersonPhoto.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class PersonPhoto 3 | Public Property PersonId() As Integer 4 | Public Property Photo() As Byte() 5 | Public Property Caption() As String 6 | Public Property PhotoOf() As Person 7 | End Class 8 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_FluentAPI/DataAccess/ReservationConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity.ModelConfiguration; 2 | using Model; 3 | 4 | namespace DataAccess 5 | { 6 | public class ReservationConfiguration : EntityTypeConfiguration 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 SelfTrackingEntities/2e Chapter 18 SelfTrackingEntities/BreakAwayModel/BAModel.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 18 SelfTrackingEntities/2e Chapter 18 SelfTrackingEntities/BreakAwayModel/BAModel.zip -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/DataAccess/ReservationConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | 4 | Namespace DataAccess 5 | Public Class ReservationConfiguration 6 | Inherits EntityTypeConfiguration(Of Reservation) 7 | End Class 8 | End Namespace 9 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_DataAnnotations/Model/Resort.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | public class Resort : Lodging 6 | { 7 | public string Entertainment { get; set; } 8 | public string Activities { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/Model/PersonPhoto.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class PersonPhoto 3 | Public Property PersonId() As Integer 4 | Public Property Photo() As Byte() 5 | Public Property Caption() As String 6 | Public Property PhotoOf() As Person 7 | End Class 8 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_FluentAPI/Model/Activity.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Model 4 | { 5 | public class Activity 6 | { 7 | public int ActivityId { get; set; } 8 | public string Name { get; set; } 9 | public List Trips { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_DataAnnotations/Model/Resort.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | public class Resort : Lodging 6 | { 7 | public string Entertainment { get; set; } 8 | public string Activities { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/Model/Activity.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Model 4 | { 5 | public class Activity 6 | { 7 | public int ActivityId { get; set; } 8 | public string Name { get; set; } 9 | public List Trips { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/FieldTemplates/EmailAddress.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" CodeBehind="EmailAddress.ascx.cs" Inherits="Chapter12Dynamic.EmailAddressField" %> 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_FluentAPI/Model/PersonPhoto.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class PersonPhoto 4 | { 5 | public int PersonId { get; set; } 6 | public byte[] Photo { get; set; } 7 | public string Caption { get; set; } 8 | public Person PhotoOf { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/Model/PersonPhoto.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class PersonPhoto 4 | { 5 | public int PersonId { get; set; } 6 | public byte[] Photo { get; set; } 7 | public string Caption { get; set; } 8 | public Person PhotoOf { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/DataAccess/ReservationConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | 4 | Namespace DataAccess 5 | Public Class ReservationConfiguration 6 | Inherits EntityTypeConfiguration(Of Reservation) 7 | End Class 8 | End Namespace 9 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/readme.txt: -------------------------------------------------------------------------------- 1 | This is sample code from 2 | Programming Entity Framework: Code First 3 | by Julie Lerman and Rowan Miller 4 | (O'Reilly Media Nov 2011) 5 | 6 | Downloaded from learnentityframework.com 7 | 8 | Purchase the print or digital version of the book at O'Reilly.com or your favorite book reseller :) -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/readme.txt: -------------------------------------------------------------------------------- 1 | This is sample code from 2 | Programming Entity Framework: Code First 3 | by Julie Lerman and Rowan Miller 4 | (O'Reilly Media Nov 2011) 5 | 6 | Downloaded from learnentityframework.com 7 | 8 | Purchase the print or digital version of the book at O'Reilly.com or your favorite book reseller :) -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/readme.txt: -------------------------------------------------------------------------------- 1 | This is sample code from 2 | Programming Entity Framework: Code First 3 | by Julie Lerman and Rowan Miller 4 | (O'Reilly Media Nov 2011) 5 | 6 | Downloaded from learnentityframework.com 7 | 8 | Purchase the print or digital version of the book at O'Reilly.com or your favorite book reseller :) -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Data Annotations/Model/Resort.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | Public Class Resort 5 | Inherits Lodging 6 | Public Property Entertainment() As String 7 | Public Property Activities() As String 8 | End Class 9 | End Namespace 10 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_FluentAPI/Model/Activity.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Model 4 | { 5 | public class Activity 6 | { 7 | public int ActivityId { get; set; } 8 | public string Name { get; set; } 9 | public List Trips { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_FluentAPI/Model/PersonPhoto.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class PersonPhoto 4 | { 5 | public int PersonId { get; set; } 6 | public byte[] Photo { get; set; } 7 | public string Caption { get; set; } 8 | public Person PhotoOf { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/readme.txt: -------------------------------------------------------------------------------- 1 | This is sample code from 2 | Programming Entity Framework: Code First 3 | by Julie Lerman and Rowan Miller 4 | (O'Reilly Media Nov 2011) 5 | 6 | Downloaded from learnentityframework.com 7 | 8 | Purchase the print or digital version of the book at O'Reilly.com or your favorite book reseller :) -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/readme.txt: -------------------------------------------------------------------------------- 1 | This is sample code from 2 | Programming Entity Framework: Code First 3 | by Julie Lerman and Rowan Miller 4 | (O'Reilly Media Nov 2011) 5 | 6 | Downloaded from learnentityframework.com 7 | 8 | Purchase the print or digital version of the book at O'Reilly.com or your favorite book reseller :) -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter4/Model/IObjectWithState.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Model 4 | { 5 | public interface IObjectWithState 6 | { 7 | State State { get; set; } 8 | } 9 | 10 | public enum State 11 | { 12 | Added, 13 | Unchanged, 14 | Deleted 15 | } 16 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter5/Model/IObjectWithState.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Model 4 | { 5 | public interface IObjectWithState 6 | { 7 | State State { get; set; } 8 | } 9 | 10 | public enum State 11 | { 12 | Added, 13 | Unchanged, 14 | Deleted 15 | } 16 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter6/Model/IObjectWithState.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Model 4 | { 5 | public interface IObjectWithState 6 | { 7 | State State { get; set; } 8 | } 9 | 10 | public enum State 11 | { 12 | Added, 13 | Unchanged, 14 | Deleted 15 | } 16 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter7/Model/IObjectWithState.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Model 4 | { 5 | public interface IObjectWithState 6 | { 7 | State State { get; set; } 8 | } 9 | 10 | public enum State 11 | { 12 | Added, 13 | Unchanged, 14 | Deleted 15 | } 16 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/Model/IObjectWithState.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Model 4 | { 5 | public interface IObjectWithState 6 | { 7 | State State { get; set; } 8 | } 9 | 10 | public enum State 11 | { 12 | Added, 13 | Unchanged, 14 | Deleted 15 | } 16 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/Site.master.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Web.DynamicData; 3 | using System.Web.UI.WebControls; 4 | 5 | namespace Chapter12Dynamic 6 | { 7 | public partial class Site : System.Web.UI.MasterPage 8 | { 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/Sample Models Chapter 2 through 7/ReadMe.txt: -------------------------------------------------------------------------------- 1 | Programming Entity Framework 2nd Edition 2 | by Julia Lerman 3 | www.ProgrammingEntityFramework.com 4 | Chapter 7, Using Stored Procedures with the EDM 5 | 6 | This is the Entity Data Model created in Chapter 2 along with the stored procedure mappings added in Chatper 7. 7 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/DataAnnotations/Model/Resort.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | Public Class Resort 5 | Inherits Lodging 6 | Public Property Entertainment() As String 7 | Public Property Activities() As String 8 | End Class 9 | End Namespace 10 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 WCF POCOs/Chapter18WCFService/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Fluent/Model/Trip.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Trip 3 | Public Property Identifier() As Guid 4 | Public Property StartDate() As Date 5 | Public Property EndDate() As Date 6 | Public Property CostUSD() As Decimal 7 | Public Property RowVersion() As Byte() 8 | End Class 9 | End Namespace -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 17 WCF EntityObjects/Chapter17WCFServices/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 WCF POCOs/Chapter18POCOState/StateObject.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Runtime.Serialization; 3 | 4 | namespace POCO.State 5 | { 6 | 7 | [DataContract(IsReference = true)] 8 | public class StateObject 9 | { 10 | [DataMember] 11 | public State State { get; set; } 12 | 13 | 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 24 PI Tests Repository/POCOState/StateObject.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace POCO.State 4 | { 5 | [DataContract(IsReference = true)] 6 | public class StateObject 7 | { 8 | [DataMember] 9 | public State State { get; set; } 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Fluent/Model/Address.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Address 3 | Public Property AddressId() As Integer 4 | Public Property StreetAddress() As String 5 | Public Property City() As String 6 | Public Property State() As String 7 | Public Property ZipCode() As String 8 | End Class 9 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/Model/Address.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Address 3 | Public Property AddressId() As Integer 4 | Public Property StreetAddress() As String 5 | Public Property City() As String 6 | Public Property State() As String 7 | Public Property ZipCode() As String 8 | End Class 9 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/Model/Address.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Address 3 | Public Property AddressId() As Integer 4 | Public Property StreetAddress() As String 5 | Public Property City() As String 6 | Public Property State() As String 7 | Public Property ZipCode() As String 8 | End Class 9 | End Namespace -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/FieldTemplates/ManyToMany_Edit.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" CodeBehind="ManyToMany_Edit.ascx.cs" Inherits="Chapter12Dynamic.ManyToMany_EditField" %> 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 WCF POCOs/BreakAwayPOCOEntities/2e Chapter 18 BreakAway T4 Template with Modifications for CSharp.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/ProgrammingEntityFrameworkBook/HEAD/Programming EF 2nd Edition/2e Chapter 18 WCF POCOs/BreakAwayPOCOEntities/2e Chapter 18 BreakAway T4 Template with Modifications for CSharp.zip -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter 2 VB/Fluent API/Model/Lodging.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Lodging 3 | Public Property LodgingId() As Integer 4 | Public Property Name() As String 5 | Public Property Owner() As String 6 | Public Property IsResort() As Boolean 7 | Public Property Destination() As Destination 8 | End Class 9 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter2/BAGA_DataAnnotations/DataAccess/BreakAwayContext.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | using Model; 3 | 4 | namespace DataAccess 5 | { 6 | public class BreakAwayContext : DbContext 7 | { 8 | public DbSet Destinations { get; set; } 9 | public DbSet Lodgings { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/Model/Reservation.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Reservation 3 | Public Property ReservationId() As Integer 4 | Public Property DateTimeMade() As Date 5 | Public Property Traveler() As Person 6 | Public Property Trip() As Trip 7 | Public Property PaidInFull() As Date 8 | End Class 9 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/Model/Address.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Address 3 | Public Property AddressId() As Integer 4 | Public Property StreetAddress() As String 5 | Public Property City() As String 6 | Public Property State() As String 7 | Public Property ZipCode() As String 8 | End Class 9 | End Namespace -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/FieldTemplates/ForeignKey.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" CodeBehind="ForeignKey.ascx.cs" Inherits="Chapter12Dynamic.ForeignKeyField" %> 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 26 Layered WPF/WPFUI/Window1.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 9 WPF/Chapter 9 WPF/Window1.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 9 Windows Forms/Chapter9WindowsForm/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Programing EF DbContext/StartingSolution/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [ComplexType] 6 | public class PersonalInfo 7 | { 8 | public Measurement Weight { get; set; } 9 | public Measurement Height { get; set; } 10 | public string DietryRestrictions { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2ePersistedStateEntry/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter2/BAGA_FluentAPI/Model/Lodging.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Lodging 4 | { 5 | public int LodgingId { get; set; } 6 | public string Name { get; set; } 7 | public string Owner { get; set; } 8 | public bool IsResort { get; set; } 9 | public Destination Destination { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_FluentAPI/Model/Address.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Address 4 | { 5 | public int AddressId { get; set; } 6 | public string StreetAddress { get; set; } 7 | public string City { get; set; } 8 | public string State { get; set; } 9 | public string ZipCode { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_FluentAPI/Model/Address.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Address 4 | { 5 | public int AddressId { get; set; } 6 | public string StreetAddress { get; set; } 7 | public string City { get; set; } 8 | public string State { get; set; } 9 | public string ZipCode { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Data Annotations/Model/Reservation.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Reservation 3 | Public Property ReservationId() As Integer 4 | Public Property DateTimeMade() As Date 5 | Public Property Traveler() As Person 6 | Public Property Trip() As Trip 7 | Public Property PaidInFull() As Date 8 | End Class 9 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/Model/Address.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Address 4 | { 5 | public int AddressId { get; set; } 6 | public string StreetAddress { get; set; } 7 | public string City { get; set; } 8 | public string State { get; set; } 9 | public string ZipCode { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/Model/Reservation.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Reservation 3 | Public Property ReservationId() As Integer 4 | Public Property DateTimeMade() As Date 5 | Public Property Traveler() As Person 6 | Public Property Trip() As Trip 7 | Public Property PaidInFull() As Date 8 | End Class 9 | End Namespace -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter2/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [ComplexType] 6 | public class PersonalInfo 7 | { 8 | public Measurement Weight { get; set; } 9 | public Measurement Height { get; set; } 10 | public string DietryRestrictions { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter3/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [ComplexType] 6 | public class PersonalInfo 7 | { 8 | public Measurement Weight { get; set; } 9 | public Measurement Height { get; set; } 10 | public string DietryRestrictions { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter4/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [ComplexType] 6 | public class PersonalInfo 7 | { 8 | public Measurement Weight { get; set; } 9 | public Measurement Height { get; set; } 10 | public string DietryRestrictions { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter5/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [ComplexType] 6 | public class PersonalInfo 7 | { 8 | public Measurement Weight { get; set; } 9 | public Measurement Height { get; set; } 10 | public string DietryRestrictions { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter6/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [ComplexType] 6 | public class PersonalInfo 7 | { 8 | public Measurement Weight { get; set; } 9 | public Measurement Height { get; set; } 10 | public string DietryRestrictions { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter7/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [ComplexType] 6 | public class PersonalInfo 7 | { 8 | public Measurement Weight { get; set; } 9 | public Measurement Height { get; set; } 10 | public string DietryRestrictions { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [ComplexType] 6 | public class PersonalInfo 7 | { 8 | public Measurement Weight { get; set; } 9 | public Measurement Height { get; set; } 10 | public string DietryRestrictions { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_FluentAPI/Model/Address.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Address 4 | { 5 | public int AddressId { get; set; } 6 | public string StreetAddress { get; set; } 7 | public string City { get; set; } 8 | public string State { get; set; } 9 | public string ZipCode { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Data Annotations/Model/Activity.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | Public Class Activity 5 | Public Property ActivityId() As Integer 6 | 7 | Public Property Name() As String 8 | Public Property Trips() As List(Of Trip) 9 | End Class 10 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Data Annotations/Model/Activity.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | Public Class Activity 5 | Public Property ActivityId() As Integer 6 | 7 | Public Property Name() As String 8 | Public Property Trips() As List(Of Trip) 9 | End Class 10 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/DataAnnotations/Model/Reservation.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Reservation 3 | Public Property ReservationId() As Integer 4 | Public Property DateTimeMade() As Date 5 | Public Property Traveler() As Person 6 | Public Property Trip() As Trip 7 | Public Property PaidInFull() As Date 8 | End Class 9 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter 2 VB/Data Annotations/DataAccess/BreakAwayContext.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity 2 | Imports Model 3 | 4 | Namespace DataAccess 5 | Public Class BreakAwayContext 6 | Inherits DbContext 7 | Public Property Destinations() As DbSet(Of Destination) 8 | Public Property Lodgings() As DbSet(Of Lodging) 9 | End Class 10 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/DataAnnotations/Model/Activity.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | Public Class Activity 5 | Public Property ActivityId() As Integer 6 | 7 | Public Property Name() As String 8 | Public Property Trips() As List(Of Trip) 9 | End Class 10 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Data Annotations/Model/PersonalInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | 5 | Public Class PersonalInfo 6 | Public Property Weight() As Measurement 7 | Public Property Height() As Measurement 8 | Public Property DietryRestrictions() As String 9 | End Class 10 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_DataAnnotations/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [ComplexType] 6 | public class PersonalInfo 7 | { 8 | public Measurement Weight { get; set; } 9 | public Measurement Height { get; set; } 10 | public string DietryRestrictions { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Data Annotations/Model/PersonalInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | 5 | Public Class PersonalInfo 6 | Public Property Weight() As Measurement 7 | Public Property Height() As Measurement 8 | Public Property DietryRestrictions() As String 9 | End Class 10 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_DataAnnotations/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [ComplexType] 6 | public class PersonalInfo 7 | { 8 | public Measurement Weight { get; set; } 9 | public Measurement Height { get; set; } 10 | public string DietryRestrictions { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Data Annotations/Model/PersonalInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | 5 | Public Class PersonalInfo 6 | Public Property Weight() As Measurement 7 | Public Property Height() As Measurement 8 | Public Property DietryRestrictions() As String 9 | End Class 10 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_DataAnnotations/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [ComplexType] 6 | public class PersonalInfo 7 | { 8 | public Measurement Weight { get; set; } 9 | public Measurement Height { get; set; } 10 | public string DietryRestrictions { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Programing EF DbContext/StartingSolution/Model/Activity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Collections.Generic; 3 | 4 | namespace Model 5 | { 6 | public class Activity 7 | { 8 | public int ActivityId { get; set; } 9 | [Required, MaxLength(50)] 10 | public string Name { get; set; } 11 | public List Trips { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 SelfTrackingEntities/2e Chapter 18 SelfTrackingEntities/Ch16 CustomerSTEService/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/DataAnnotations/Model/PersonalInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | 5 | Public Class PersonalInfo 6 | Public Property Weight() As Measurement 7 | Public Property Height() As Measurement 8 | Public Property DietryRestrictions() As String 9 | End Class 10 | End Namespace -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter2/Model/Activity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Collections.Generic; 3 | 4 | namespace Model 5 | { 6 | public class Activity 7 | { 8 | public int ActivityId { get; set; } 9 | [Required, MaxLength(50)] 10 | public string Name { get; set; } 11 | public List Trips { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter3/Model/Activity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Collections.Generic; 3 | 4 | namespace Model 5 | { 6 | public class Activity 7 | { 8 | public int ActivityId { get; set; } 9 | [Required, MaxLength(50)] 10 | public string Name { get; set; } 11 | public List Trips { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter4/Model/Activity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Collections.Generic; 3 | 4 | namespace Model 5 | { 6 | public class Activity 7 | { 8 | public int ActivityId { get; set; } 9 | [Required, MaxLength(50)] 10 | public string Name { get; set; } 11 | public List Trips { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter5/Model/Activity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Collections.Generic; 3 | 4 | namespace Model 5 | { 6 | public class Activity 7 | { 8 | public int ActivityId { get; set; } 9 | [Required, MaxLength(50)] 10 | public string Name { get; set; } 11 | public List Trips { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter6/Model/Activity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Collections.Generic; 3 | 4 | namespace Model 5 | { 6 | public class Activity 7 | { 8 | public int ActivityId { get; set; } 9 | [Required, MaxLength(50)] 10 | public string Name { get; set; } 11 | public List Trips { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Filters/Boolean.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" CodeBehind="Boolean.ascx.cs" Inherits="Chapter12Dynamic.BooleanFilter" %> 2 | 3 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_FluentAPI/Model/Trip.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Model 4 | { 5 | public class Trip 6 | { 7 | public Guid Identifier { get; set; } 8 | public DateTime StartDate { get; set; } 9 | public DateTime EndDate { get; set; } 10 | public decimal CostUSD { get; set; } 11 | public byte[] RowVersion { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_DataAnnotations/Model/PersonalInfo.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [ComplexType] 6 | public class PersonalInfo 7 | { 8 | public Measurement Weight { get; set; } 9 | public Measurement Height { get; set; } 10 | public string DietryRestrictions { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 26 Layered WPF/WPFUI/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 9 WPF/Chapter 9 WPF/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter7/Model/Activity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Collections.Generic; 3 | 4 | namespace Model 5 | { 6 | public class Activity : Logger 7 | { 8 | public int ActivityId { get; set; } 9 | [Required, MaxLength(50)] 10 | public string Name { get; set; } 11 | public List Trips { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/Model/Activity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Collections.Generic; 3 | 4 | namespace Model 5 | { 6 | public class Activity : Logger 7 | { 8 | public int ActivityId { get; set; } 9 | [Required, MaxLength(50)] 10 | public string Name { get; set; } 11 | public List Trips { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/FieldTemplates/ManyToMany.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" CodeBehind="ManyToMany.ascx.cs" Inherits="Chapter12Dynamic.ManyToManyField" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2ePersistedStateEntry/TestFriends.cs: -------------------------------------------------------------------------------- 1 | //INSTANT C# NOTE: Formerly VB.NET project-level imports: 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.Data; 6 | using System.Diagnostics; 7 | using System.Linq; 8 | using System.Xml.Linq; 9 | 10 | [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("QueryCompilationTests")] -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_FluentAPI/DataAccess/AddressConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity.ModelConfiguration; 2 | using Model; 3 | 4 | namespace DataAccess 5 | { 6 | public class AddressConfiguration : ComplexTypeConfiguration
7 | { 8 | public AddressConfiguration() 9 | { 10 | Property(a => a.StreetAddress).HasMaxLength(150); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/Model/Trip.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Trip 3 | Public Property Identifier() As Guid 4 | Public Property StartDate() As Date 5 | Public Property EndDate() As Date 6 | Public Property CostUSD() As Decimal 7 | Public Property RowVersion() As Byte() 8 | 9 | Public Property Activities() As List(Of Activity) 10 | End Class 11 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_DataAnnotations/Model/Activity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Collections.Generic; 3 | 4 | namespace Model 5 | { 6 | public class Activity 7 | { 8 | public int ActivityId { get; set; } 9 | [Required, MaxLength(50)] 10 | public string Name { get; set; } 11 | public List Trips { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_FluentAPI/DataAccess/AddressConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity.ModelConfiguration; 2 | using Model; 3 | 4 | namespace DataAccess 5 | { 6 | public class AddressConfiguration : ComplexTypeConfiguration
7 | { 8 | public AddressConfiguration() 9 | { 10 | Property(a => a.StreetAddress).HasMaxLength(150); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/Model/Trip.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Trip 3 | Public Property Identifier() As Guid 4 | Public Property StartDate() As Date 5 | Public Property EndDate() As Date 6 | Public Property CostUSD() As Decimal 7 | Public Property RowVersion() As Byte() 8 | 9 | Public Property Activities() As List(Of Activity) 10 | End Class 11 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_DataAnnotations/Model/Activity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Collections.Generic; 3 | 4 | namespace Model 5 | { 6 | public class Activity 7 | { 8 | public int ActivityId { get; set; } 9 | [Required, MaxLength(50)] 10 | public string Name { get; set; } 11 | public List Trips { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/DataAccess/AddressConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity.ModelConfiguration; 2 | using Model; 3 | 4 | namespace DataAccess 5 | { 6 | public class AddressConfiguration : ComplexTypeConfiguration
7 | { 8 | public AddressConfiguration() 9 | { 10 | Property(a => a.StreetAddress).HasMaxLength(150); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/Model/Reservation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Model 4 | { 5 | public class Reservation 6 | { 7 | public int ReservationId { get; set; } 8 | public DateTime DateTimeMade { get; set; } 9 | public Person Traveler { get; set; } 10 | public Trip Trip { get; set; } 11 | public DateTime PaidInFull { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Fluent/DataAccess/AddressConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | 4 | Namespace DataAccess 5 | Public Class AddressConfiguration 6 | Inherits ComplexTypeConfiguration(Of Address) 7 | Public Sub New() 8 | Me.Property(Function(a) a.StreetAddress).HasMaxLength(150) 9 | End Sub 10 | End Class 11 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Fluent/Model/Destination.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Destination 3 | Public Property DestinationId() As Integer 4 | Public Property Name() As String 5 | Public Property Country() As String 6 | Public Property Description() As String 7 | Public Property Photo() As Byte() 8 | Public Property Lodgings() As List(Of Lodging) 9 | End Class 10 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/DataAccess/AddressConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | 4 | Namespace DataAccess 5 | Public Class AddressConfiguration 6 | Inherits ComplexTypeConfiguration(Of Address) 7 | Public Sub New() 8 | Me.Property(Function(a) a.StreetAddress).HasMaxLength(150) 9 | End Sub 10 | End Class 11 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/DataAccess/AddressConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | 4 | Namespace DataAccess 5 | Public Class AddressConfiguration 6 | Inherits ComplexTypeConfiguration(Of Address) 7 | Public Sub New() 8 | Me.Property(Function(a) a.StreetAddress).HasMaxLength(150) 9 | End Sub 10 | End Class 11 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_FluentAPI/DataAccess/AddressConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity.ModelConfiguration; 2 | using Model; 3 | 4 | namespace DataAccess 5 | { 6 | public class AddressConfiguration : ComplexTypeConfiguration
7 | { 8 | public AddressConfiguration() 9 | { 10 | Property(a => a.StreetAddress).HasMaxLength(150); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_FluentAPI/Model/Reservation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Model 4 | { 5 | public class Reservation 6 | { 7 | public int ReservationId { get; set; } 8 | public DateTime DateTimeMade { get; set; } 9 | public Person Traveler { get; set; } 10 | public Trip Trip { get; set; } 11 | public DateTime PaidInFull { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_DataAnnotations/Model/Reservation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Model 4 | { 5 | public class Reservation 6 | { 7 | public int ReservationId { get; set; } 8 | public DateTime DateTimeMade { get; set; } 9 | public Person Traveler { get; set; } 10 | public Trip Trip { get; set; } 11 | public DateTime PaidInFull { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter13SimplePOCO/Model1.Designer.cs: -------------------------------------------------------------------------------- 1 | // Default code generation is disabled for model 'F:\LCTP3Work\Book Samples Second Edition\Chapter11SimplePOCO\Model1.edmx'. 2 | // To enable default code generation, change the value of the 'Code Generation Strategy' designer 3 | // property to an alternate value. This property is available in the Properties Window when the model is 4 | // open in the designer. -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e ExtensionMethods/ReadMe.txt: -------------------------------------------------------------------------------- 1 | Programming Entity Framework 2nd Edition 2 | by Julia Lerman 3 | www.ProgrammingEntityFramework.com 4 | 5 | Extension Methods used in later chapters of the book 6 | 7 | This project contains a variety of extension methods that are used in samples throughout the latter part of the book. 8 | 9 | Julie Lerman 10 | thedatafarm.com/blog 11 | twitter.com/julielerman -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter 2 VB/Fluent API/DataAccess/LodgingConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | 4 | Namespace DataAccess 5 | Public Class LodgingConfiguration 6 | Inherits EntityTypeConfiguration(Of Lodging) 7 | Public Sub New() 8 | Me.Property(Function(l) l.Name).IsRequired().HasMaxLength(200) 9 | End Sub 10 | End Class 11 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_DataAnnotations/Model/Activity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Collections.Generic; 3 | 4 | namespace Model 5 | { 6 | public class Activity 7 | { 8 | public int ActivityId { get; set; } 9 | [Required, MaxLength(50)] 10 | public string Name { get; set; } 11 | public List Trips { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_DataAnnotations/Model/Reservation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Model 4 | { 5 | public class Reservation 6 | { 7 | public int ReservationId { get; set; } 8 | public DateTime DateTimeMade { get; set; } 9 | public Person Traveler { get; set; } 10 | public Trip Trip { get; set; } 11 | public DateTime PaidInFull { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/DataAccess/AddressConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | 4 | Namespace DataAccess 5 | Public Class AddressConfiguration 6 | Inherits ComplexTypeConfiguration(Of Address) 7 | Public Sub New() 8 | Me.Property(Function(a) a.StreetAddress).HasMaxLength(150) 9 | End Sub 10 | End Class 11 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/Model/Trip.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Trip 3 | Public Property Identifier() As Guid 4 | Public Property StartDate() As Date 5 | Public Property EndDate() As Date 6 | Public Property CostUSD() As Decimal 7 | Public Property RowVersion() As Byte() 8 | 9 | Public Property Activities() As List(Of Activity) 10 | End Class 11 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter 2 VB/Fluent API/Model/Destination.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Destination 3 | Public Property DestinationId() As Integer 4 | Public Property Name() As String 5 | Public Property Country() As String 6 | Public Property Description() As String 7 | Public Property Photo() As Byte() 8 | 9 | Public Property Lodgings() As List(Of Lodging) 10 | End Class 11 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Fluent/Model/Lodging.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Lodging 3 | Public Property LodgingId() As Integer 4 | Public Property Name() As String 5 | Public Property Owner() As String 6 | Public Property IsResort() As Boolean 7 | Public Property MilesFromNearestAirport() As Decimal 8 | 9 | Public Property Destination() As Destination 10 | End Class 11 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Data Annotations/Model/PersonPhoto.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | Public Class PersonPhoto 5 | 6 | Public Property PersonId() As Integer 7 | Public Property Photo() As Byte() 8 | Public Property Caption() As String 9 | 10 | Public Property PhotoOf() As Person 11 | End Class 12 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/Model/Destination.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class Destination 3 | Public Property DestinationId() As Integer 4 | Public Property Name() As String 5 | Public Property Country() As String 6 | Public Property Description() As String 7 | Public Property Photo() As Byte() 8 | 9 | Public Property Lodgings() As List(Of Lodging) 10 | End Class 11 | End Namespace -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/MvcApplication1.Tests/App.config: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Programing EF DbContext/StartingSolution/Model/Payment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Model 4 | { 5 | public class Payment 6 | { 7 | public Payment() 8 | { 9 | PaymentDate = DateTime.Now; 10 | } 11 | 12 | public int PaymentId { get; set; } 13 | public int ReservationId { get; set; } 14 | public DateTime PaymentDate { get; set; } 15 | public decimal Amount { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 26 Layered WPF/WPFUI/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Windows; 7 | 8 | namespace Chapter_8_WPF 9 | { 10 | /// 11 | /// Interaction logic for App.xaml 12 | /// 13 | public partial class App : Application 14 | { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 9 WPF/Chapter 9 WPF/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Windows; 7 | 8 | namespace Chapter_9_WPF 9 | { 10 | /// 11 | /// Interaction logic for App.xaml 12 | /// 13 | public partial class App : Application 14 | { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_FluentAPI/Model/Lodging.cs: -------------------------------------------------------------------------------- 1 | namespace Model 2 | { 3 | public class Lodging 4 | { 5 | public int LodgingId { get; set; } 6 | public string Name { get; set; } 7 | public string Owner { get; set; } 8 | public bool IsResort { get; set; } 9 | public decimal MilesFromNearestAirport { get; set; } 10 | 11 | public Destination Destination { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter2/Model/Payment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Model 4 | { 5 | public class Payment 6 | { 7 | public Payment() 8 | { 9 | PaymentDate = DateTime.Now; 10 | } 11 | 12 | public int PaymentId { get; set; } 13 | public int ReservationId { get; set; } 14 | public DateTime PaymentDate { get; set; } 15 | public decimal Amount { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter3/Model/Payment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Model 4 | { 5 | public class Payment 6 | { 7 | public Payment() 8 | { 9 | PaymentDate = DateTime.Now; 10 | } 11 | 12 | public int PaymentId { get; set; } 13 | public int ReservationId { get; set; } 14 | public DateTime PaymentDate { get; set; } 15 | public decimal Amount { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter4/Model/Payment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Model 4 | { 5 | public class Payment 6 | { 7 | public Payment() 8 | { 9 | PaymentDate = DateTime.Now; 10 | } 11 | 12 | public int PaymentId { get; set; } 13 | public int ReservationId { get; set; } 14 | public DateTime PaymentDate { get; set; } 15 | public decimal Amount { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter5/Model/Payment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Model 4 | { 5 | public class Payment 6 | { 7 | public Payment() 8 | { 9 | PaymentDate = DateTime.Now; 10 | } 11 | 12 | public int PaymentId { get; set; } 13 | public int ReservationId { get; set; } 14 | public DateTime PaymentDate { get; set; } 15 | public decimal Amount { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter6/Model/Payment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Model 4 | { 5 | public class Payment 6 | { 7 | public Payment() 8 | { 9 | PaymentDate = DateTime.Now; 10 | } 11 | 12 | public int PaymentId { get; set; } 13 | public int ReservationId { get; set; } 14 | public DateTime PaymentDate { get; set; } 15 | public decimal Amount { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter2/BAGA_FluentAPI/DataAccess/LodgingConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity.ModelConfiguration; 2 | using Model; 3 | 4 | namespace DataAccess 5 | { 6 | public class LodgingConfiguration : EntityTypeConfiguration 7 | { 8 | public LodgingConfiguration() 9 | { 10 | Property(l => l.Name) 11 | .IsRequired() 12 | .HasMaxLength(200); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_DataAnnotations/Model/PersonPhoto.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | public class PersonPhoto 6 | { 7 | [Key] 8 | [ForeignKey("PhotoOf")] 9 | public int PersonId { get; set; } 10 | public byte[] Photo { get; set; } 11 | public string Caption { get; set; } 12 | 13 | public Person PhotoOf { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 11 Customization/BreakAwayModel/Partial Classes Added in Chapter 11/Reservation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BAGA 7 | { 8 | partial class Reservation 9 | { 10 | public string TripDetails 11 | { 12 | get 13 | { 14 | return Trip.TripDetails; 15 | } 16 | } 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/BreakAwayModelCh7/Partial Classes Added in Chapter 10/Reservation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BAGA 7 | { 8 | partial class Reservation 9 | { 10 | public string TripDetails 11 | { 12 | get 13 | { 14 | return Trip.TripDetails; 15 | } 16 | } 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Filters/Enumeration.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" CodeBehind="Enumeration.ascx.cs" Inherits="Chapter12Dynamic.EnumerationFilter" %> 2 | 3 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/Filters/ForeignKey.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" CodeBehind="ForeignKey.ascx.cs" Inherits="Chapter12Dynamic.ForeignKeyFilter" %> 2 | 3 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 26 Layered WPF/BreakAwayModel POCO/BAModel.Designer.cs: -------------------------------------------------------------------------------- 1 | // Default code generation is disabled for model 'F:\LCTP3Work\Book Samples Second Edition\BreakAwayModelCh22 POCO\BAModel.edmx'. 2 | // To enable default code generation, change the value of the 'Code Generation Strategy' designer 3 | // property to an alternate value. This property is available in the Properties Window when the model is 4 | // open in the designer. -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/BreakAwayModel POCO/BAModel.Designer.cs: -------------------------------------------------------------------------------- 1 | // Default code generation is disabled for model 'F:\LCTP3Work\Book Samples Second Edition\BreakAwayModelCh22 POCO\BAModel.edmx'. 2 | // To enable default code generation, change the value of the 'Code Generation Strategy' designer 3 | // property to an alternate value. This property is available in the Properties Window when the model is 4 | // open in the designer. -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 WCF POCOs/BreakAwayModel POCO/BAModel.Designer.cs: -------------------------------------------------------------------------------- 1 | // Default code generation is disabled for model 'F:\_EF2_Samples_For_Deploy\2e Chapter 18 WCF POCOs\BreakAwayModel POCO\BAModel.edmx'. 2 | // To enable default code generation, change the value of the 'Code Generation Strategy' designer 3 | // property to an alternate value. This property is available in the Properties Window when the model is 4 | // open in the designer. -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_DataAnnotations/DataAccess/BreakAwayContext.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | using Model; 3 | 4 | namespace DataAccess 5 | { 6 | public class BreakAwayContext : DbContext 7 | { 8 | public DbSet Destinations { get; set; } 9 | public DbSet Lodgings { get; set; } 10 | public DbSet Trips { get; set; } 11 | public DbSet People { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_DataAnnotations/DataAccess/BreakAwayContext.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | using Model; 3 | 4 | namespace DataAccess 5 | { 6 | public class BreakAwayContext : DbContext 7 | { 8 | public DbSet Destinations { get; set; } 9 | public DbSet Lodgings { get; set; } 10 | public DbSet Trips { get; set; } 11 | public DbSet People { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 WCF POCOs/Chapter18WCFService/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 24 PI Tests Repository/BreakAwayModel POCO/BAModel.Designer.cs: -------------------------------------------------------------------------------- 1 | // Default code generation is disabled for model 'F:\LCTP3Work\Book Samples Second Edition\BreakAwayModelCh22 POCO\BAModel.edmx'. 2 | // To enable default code generation, change the value of the 'Code Generation Strategy' designer 3 | // property to an alternate value. This property is available in the Properties Window when the model is 4 | // open in the designer. -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/Site.Master.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | 8 | namespace Ch25WebForm 9 | { 10 | public partial class SiteMaster : System.Web.UI.MasterPage 11 | { 12 | protected void Page_Load(object sender, EventArgs e) 13 | { 14 | 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Data Annotations/Model/Address.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | 5 | Public Class Address 6 | Public Property AddressId() As Integer 7 | 8 | Public Property StreetAddress() As String 9 | Public Property City() As String 10 | Public Property State() As String 11 | Public Property ZipCode() As String 12 | End Class 13 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Data Annotations/Model/Address.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | 5 | Public Class Address 6 | Public Property AddressId() As Integer 7 | 8 | Public Property StreetAddress() As String 9 | Public Property City() As String 10 | Public Property State() As String 11 | Public Property ZipCode() As String 12 | End Class 13 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_DataAnnotations/DataAccess/BreakAwayContext.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | using Model; 3 | 4 | namespace DataAccess 5 | { 6 | public class BreakAwayContext : DbContext 7 | { 8 | public DbSet Destinations { get; set; } 9 | public DbSet Lodgings { get; set; } 10 | public DbSet Trips { get; set; } 11 | public DbSet People { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/DataAccess/ReservationDbSet.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using Model; 4 | 5 | namespace Testing 6 | { 7 | public class ReservationDbSet : FakeDbSet 8 | { 9 | public override Reservation Find(params object[] keyValues) 10 | { 11 | var keyValue = (int)keyValues.FirstOrDefault(); 12 | return this.SingleOrDefault(r => r.ReservationId == keyValue); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 17 WCF EntityObjects/Chapter17WCFServices/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/DataAccess/ActivityConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | Imports System.ComponentModel.DataAnnotations 4 | 5 | Namespace DataAccess 6 | Public Class ActivityConfiguration 7 | Inherits EntityTypeConfiguration(Of Activity) 8 | Public Sub New() 9 | Me.Property(Function(a) a.Name).IsRequired().HasMaxLength(50) 10 | End Sub 11 | End Class 12 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/DataAccess/PersonConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | Imports System.ComponentModel.DataAnnotations 4 | 5 | Namespace DataAccess 6 | Public Class PersonConfiguration 7 | Inherits EntityTypeConfiguration(Of Person) 8 | Public Sub New() 9 | Me.Property(Function(p) p.SocialSecurityNumber).IsConcurrencyToken() 10 | End Sub 11 | End Class 12 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/DataAccess/ActivityConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | Imports System.ComponentModel.DataAnnotations 4 | 5 | Namespace DataAccess 6 | Public Class ActivityConfiguration 7 | Inherits EntityTypeConfiguration(Of Activity) 8 | Public Sub New() 9 | Me.Property(Function(a) a.Name).IsRequired().HasMaxLength(50) 10 | End Sub 11 | End Class 12 | End Namespace -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/Account/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Repositories/Interfaces/IEntityRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BAGA.Repository.Interfaces 4 | { 5 | public interface IEntityRepository 6 | { 7 | // IContext Context { get; } 8 | TEntity GetById(int id); 9 | void Add(TEntity entity); 10 | void Attach(TEntity entity); 11 | void Delete(TEntity entity); 12 | IList All(); 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Data Annotations/DataAccess/BreakAwayContext.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity 2 | Imports Model 3 | 4 | Namespace DataAccess 5 | Public Class BreakAwayContext 6 | Inherits DbContext 7 | Public Property Destinations() As DbSet(Of Destination) 8 | Public Property Lodgings() As DbSet(Of Lodging) 9 | Public Property Trips() As DbSet(Of Trip) 10 | Public Property People() As DbSet(Of Person) 11 | End Class 12 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_DataAnnotations/Model/Address.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [ComplexType] 6 | public class Address 7 | { 8 | public int AddressId { get; set; } 9 | [MaxLength(150)] 10 | public string StreetAddress { get; set; } 11 | public string City { get; set; } 12 | public string State { get; set; } 13 | public string ZipCode { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_FluentAPI/Model/Destination.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Model 4 | { 5 | public class Destination 6 | { 7 | public int DestinationId { get; set; } 8 | public string Name { get; set; } 9 | public string Country { get; set; } 10 | public string Description { get; set; } 11 | public byte[] Photo { get; set; } 12 | public List Lodgings { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Data Annotations/DataAccess/BreakAwayContext.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity 2 | Imports Model 3 | 4 | Namespace DataAccess 5 | Public Class BreakAwayContext 6 | Inherits DbContext 7 | Public Property Destinations() As DbSet(Of Destination) 8 | Public Property Lodgings() As DbSet(Of Lodging) 9 | Public Property Trips() As DbSet(Of Trip) 10 | Public Property People() As DbSet(Of Person) 11 | End Class 12 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_DataAnnotations/Model/Address.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [ComplexType] 6 | public class Address 7 | { 8 | public int AddressId { get; set; } 9 | [MaxLength(150)] 10 | public string StreetAddress { get; set; } 11 | public string City { get; set; } 12 | public string State { get; set; } 13 | public string ZipCode { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_FluentAPI/DataAccess/PersonConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity.ModelConfiguration; 2 | using Model; 3 | using System.ComponentModel.DataAnnotations; 4 | 5 | namespace DataAccess 6 | { 7 | public class PersonConfiguration : EntityTypeConfiguration 8 | { 9 | public PersonConfiguration() 10 | { 11 | Property(p => p.SocialSecurityNumber) 12 | .IsConcurrencyToken(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Programing EF DbContext/StartingSolution/Model/PersonPhoto.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [Table("People")] 6 | public class PersonPhoto 7 | { 8 | [Key] 9 | [ForeignKey("PhotoOf")] 10 | public int PersonId { get; set; } 11 | [Column(TypeName = "image")] 12 | public byte[] Photo { get; set; } 13 | public string Caption { get; set; } 14 | 15 | public Person PhotoOf { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 24 PI Tests Repository/Repositories/Interfaces/IEntityRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BAGA.Repository.Interfaces 4 | { 5 | public interface IEntityRepository 6 | { 7 | // IContext Context { get; } 8 | TEntity GetById(int id); 9 | void Add(TEntity entity); 10 | void Attach(TEntity entity); 11 | void Delete(TEntity entity); 12 | IList All(); 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 26 Layered WPF/BreakAwayPOCOEntities/Partial Classes Added in Chapter 10/Address.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BAGA 7 | { 8 | partial class Address 9 | { 10 | public bool Validate(out string validationError) 11 | { 12 | ModifiedDate = DateTime.Now; 13 | validationError = ""; 14 | return true; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/BreakAwayPOCOEntities/Partial Classes Added in Chapter 10/Address.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BAGA 7 | { 8 | partial class Address 9 | { 10 | public bool Validate(out string validationError) 11 | { 12 | ModifiedDate = DateTime.Now; 13 | validationError = ""; 14 | return true; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/Account/ChangePassword.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | 8 | namespace Ch25WebForm.Account 9 | { 10 | public partial class ChangePassword : System.Web.UI.Page 11 | { 12 | protected void Page_Load(object sender, EventArgs e) 13 | { 14 | 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter 2 VB/Data Annotations/Model/Lodging.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | Public Class Lodging 5 | Public Property LodgingId() As Integer 6 | 7 | Public Property Name() As String 8 | Public Property Owner() As String 9 | Public Property IsResort() As Boolean 10 | 11 | Public Property Destination() As Destination 12 | End Class 13 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter2/BAGA_FluentAPI/Model/Destination.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Model 4 | { 5 | public class Destination 6 | { 7 | public int DestinationId { get; set; } 8 | public string Name { get; set; } 9 | public string Country { get; set; } 10 | public string Description { get; set; } 11 | public byte[] Photo { get; set; } 12 | 13 | public List Lodgings { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/Model/InternetSpecial.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class InternetSpecial 3 | Public Property InternetSpecialId() As Integer 4 | Public Property Nights() As Integer 5 | Public Property CostUSD() As Decimal 6 | Public Property FromDate() As Date 7 | Public Property ToDate() As Date 8 | 9 | Public Property AccommodationId() As Integer 10 | Public Property Accommodation() As Lodging 11 | End Class 12 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_FluentAPI/Model/Destination.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Model 4 | { 5 | public class Destination 6 | { 7 | public int DestinationId { get; set; } 8 | public string Name { get; set; } 9 | public string Country { get; set; } 10 | public string Description { get; set; } 11 | public byte[] Photo { get; set; } 12 | 13 | public List Lodgings { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/Model/InternetSpecial.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class InternetSpecial 3 | Public Property InternetSpecialId() As Integer 4 | Public Property Nights() As Integer 5 | Public Property CostUSD() As Decimal 6 | Public Property FromDate() As Date 7 | Public Property ToDate() As Date 8 | 9 | Public Property AccommodationId() As Integer 10 | Public Property Accommodation() As Lodging 11 | End Class 12 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/DataAccess/ActivityConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | Imports System.ComponentModel.DataAnnotations 4 | 5 | Namespace DataAccess 6 | Public Class ActivityConfiguration 7 | Inherits EntityTypeConfiguration(Of Activity) 8 | Public Sub New() 9 | Me.Property(Function(a) a.Name).IsRequired().HasMaxLength(50) 10 | End Sub 11 | End Class 12 | End Namespace -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter2/Model/PersonPhoto.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [Table("People")] 6 | public class PersonPhoto 7 | { 8 | [Key] 9 | [ForeignKey("PhotoOf")] 10 | public int PersonId { get; set; } 11 | [Column(TypeName = "image")] 12 | public byte[] Photo { get; set; } 13 | public string Caption { get; set; } 14 | 15 | public Person PhotoOf { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter3/Model/PersonPhoto.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [Table("People")] 6 | public class PersonPhoto 7 | { 8 | [Key] 9 | [ForeignKey("PhotoOf")] 10 | public int PersonId { get; set; } 11 | [Column(TypeName = "image")] 12 | public byte[] Photo { get; set; } 13 | public string Caption { get; set; } 14 | 15 | public Person PhotoOf { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter4/Model/PersonPhoto.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [Table("People")] 6 | public class PersonPhoto 7 | { 8 | [Key] 9 | [ForeignKey("PhotoOf")] 10 | public int PersonId { get; set; } 11 | [Column(TypeName = "image")] 12 | public byte[] Photo { get; set; } 13 | public string Caption { get; set; } 14 | 15 | public Person PhotoOf { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter5/Model/PersonPhoto.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [Table("People")] 6 | public class PersonPhoto 7 | { 8 | [Key] 9 | [ForeignKey("PhotoOf")] 10 | public int PersonId { get; set; } 11 | [Column(TypeName = "image")] 12 | public byte[] Photo { get; set; } 13 | public string Caption { get; set; } 14 | 15 | public Person PhotoOf { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter6/Model/PersonPhoto.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [Table("People")] 6 | public class PersonPhoto 7 | { 8 | [Key] 9 | [ForeignKey("PhotoOf")] 10 | public int PersonId { get; set; } 11 | [Column(TypeName = "image")] 12 | public byte[] Photo { get; set; } 13 | public string Caption { get; set; } 14 | 15 | public Person PhotoOf { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter7/Model/PersonPhoto.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [Table("People")] 6 | public class PersonPhoto 7 | { 8 | [Key] 9 | [ForeignKey("PhotoOf")] 10 | public int PersonId { get; set; } 11 | [Column(TypeName = "image")] 12 | public byte[] Photo { get; set; } 13 | public string Caption { get; set; } 14 | 15 | public Person PhotoOf { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/Model/PersonPhoto.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [Table("People")] 6 | public class PersonPhoto 7 | { 8 | [Key] 9 | [ForeignKey("PhotoOf")] 10 | public int PersonId { get; set; } 11 | [Column(TypeName = "image")] 12 | public byte[] Photo { get; set; } 13 | public string Caption { get; set; } 14 | 15 | public Person PhotoOf { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12EDSv1/ContactsandCustomerInfo.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | 8 | namespace Chapter12EDSv1 9 | { 10 | public partial class ContactsandCustomerInfo : System.Web.UI.Page 11 | { 12 | protected void Page_Load(object sender, EventArgs e) 13 | { 14 | 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12EDSv1/WebForm1.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | 8 | namespace Chapter12EDSv1 9 | { 10 | public partial class WebForm1 : System.Web.UI.Page 11 | { 12 | protected void Page_Load(object sender, EventArgs e) 13 | { 14 | // this.EntityDataSource1. 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Data Annotations/Model/PersonPhoto.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | 5 | Public Class PersonPhoto 6 | 7 | Public Property PersonId() As Integer 8 | 9 | Public Property Photo() As Byte() 10 | Public Property Caption() As String 11 | 12 | Public Property PhotoOf() As Person 13 | End Class 14 | End Namespace -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/web.config: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 SelfTrackingEntities/2e Chapter 18 SelfTrackingEntities/BreakAwayModel/BAModel.Designer.cs: -------------------------------------------------------------------------------- 1 | // Default code generation is disabled for model 'F:\LCTP3Work\Book Samples Second Edition\BreakAwayModelCh13STES\BAModel.edmx'. 2 | // To enable default code generation, change the value of the 'Code Generation Strategy' designer 3 | // property to an alternate value. This property is available in the Properties Window when the model is 4 | // open in the designer. -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 24 PI Tests Repository/BreakAwayPOCOEntities/Partial Classes Added in Chapter 10/Address.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BAGA 7 | { 8 | partial class Address 9 | { 10 | public bool Validate(out string validationError) 11 | { 12 | ModifiedDate = DateTime.Now; 13 | validationError = ""; 14 | return true; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Fluent/DataAccess/PersonConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | Imports System.ComponentModel.DataAnnotations 4 | 5 | Namespace DataAccess 6 | Public Class PersonConfiguration 7 | Inherits EntityTypeConfiguration(Of Person) 8 | Public Sub New() 9 | Me.Property(Function(p) p.SocialSecurityNumber).IsConcurrencyToken() 10 | End Sub 11 | End Class 12 | End Namespace 13 | 14 | 15 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_FluentAPI/DataAccess/ActivityConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity.ModelConfiguration; 2 | using Model; 3 | using System.ComponentModel.DataAnnotations; 4 | 5 | namespace DataAccess 6 | { 7 | public class ActivityConfiguration : EntityTypeConfiguration 8 | { 9 | public ActivityConfiguration() 10 | { 11 | Property(a => a.Name) 12 | .IsRequired() 13 | .HasMaxLength(50); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Data Annotations/DataAccess/BreakAwayContext.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity 2 | Imports Model 3 | 4 | Namespace DataAccess 5 | Public Class BreakAwayContext 6 | Inherits DbContext 7 | Public Property Destinations() As DbSet(Of Destination) 8 | Public Property Lodgings() As DbSet(Of Lodging) 9 | Public Property Trips() As DbSet(Of Trip) 10 | Public Property People() As DbSet(Of Person) 11 | End Class 12 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/DataAccess/ActivityConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity.ModelConfiguration; 2 | using Model; 3 | using System.ComponentModel.DataAnnotations; 4 | 5 | namespace DataAccess 6 | { 7 | public class ActivityConfiguration : EntityTypeConfiguration 8 | { 9 | public ActivityConfiguration() 10 | { 11 | Property(a => a.Name) 12 | .IsRequired() 13 | .HasMaxLength(50); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/Model/InternetSpecial.vb: -------------------------------------------------------------------------------- 1 | Namespace Model 2 | Public Class InternetSpecial 3 | Public Property InternetSpecialId() As Integer 4 | Public Property Nights() As Integer 5 | Public Property CostUSD() As Decimal 6 | Public Property FromDate() As Date 7 | Public Property ToDate() As Date 8 | 9 | Public Property AccommodationId() As Integer 10 | Public Property Accommodation() As Lodging 11 | End Class 12 | End Namespace -------------------------------------------------------------------------------- /Programing EF DbContext/StartingSolution/Model/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/Account/ChangePasswordSuccess.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | 8 | namespace Ch25WebForm.Account 9 | { 10 | public partial class ChangePasswordSuccess : System.Web.UI.Page 11 | { 12 | protected void Page_Load(object sender, EventArgs e) 13 | { 14 | 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Data Annotations/Model/Trip.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | Public Class Trip 5 | 6 | Public Property Identifier() As Guid 7 | Public Property StartDate() As Date 8 | Public Property EndDate() As Date 9 | Public Property CostUSD() As Decimal 10 | 11 | Public Property RowVersion() As Byte() 12 | End Class 13 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_FluentAPI/DataAccess/PersonConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity.ModelConfiguration; 2 | using Model; 3 | using System.ComponentModel.DataAnnotations; 4 | 5 | namespace DataAccess 6 | { 7 | public class PersonConfiguration : EntityTypeConfiguration 8 | { 9 | public PersonConfiguration() 10 | { 11 | Property(p => p.SocialSecurityNumber) 12 | .IsConcurrencyToken(); 13 | } 14 | } 15 | } 16 | 17 | 18 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_FluentAPI/Model/Trip.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Model 5 | { 6 | public class Trip 7 | { 8 | public Guid Identifier { get; set; } 9 | public DateTime StartDate { get; set; } 10 | public DateTime EndDate { get; set; } 11 | public decimal CostUSD { get; set; } 12 | public byte[] RowVersion { get; set; } 13 | 14 | public List Activities { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/Model/Trip.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Model 5 | { 6 | public class Trip 7 | { 8 | public Guid Identifier { get; set; } 9 | public DateTime StartDate { get; set; } 10 | public DateTime EndDate { get; set; } 11 | public decimal CostUSD { get; set; } 12 | public byte[] RowVersion { get; set; } 13 | 14 | public List Activities { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/DataAnnotations/Model/PersonPhoto.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | 5 | Public Class PersonPhoto 6 | 7 | Public Property PersonId() As Integer 8 | 9 | Public Property Photo() As Byte() 10 | Public Property Caption() As String 11 | 12 | Public Property PhotoOf() As Person 13 | End Class 14 | End Namespace -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter2/Model/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter3/Model/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter4/Model/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter5/Model/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter6/Model/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter7/Model/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/Model/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/Tests/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_FluentAPI/DataAccess/ActivityConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity.ModelConfiguration; 2 | using Model; 3 | using System.ComponentModel.DataAnnotations; 4 | 5 | namespace DataAccess 6 | { 7 | public class ActivityConfiguration : EntityTypeConfiguration 8 | { 9 | public ActivityConfiguration() 10 | { 11 | Property(a => a.Name) 12 | .IsRequired() 13 | .HasMaxLength(50); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/DataAccess/SalesContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Data.Entity; 6 | using Model; 7 | 8 | namespace DataAccess 9 | { 10 | public class SalesContext : BaseContext 11 | { 12 | public DbSet People { get; set; } 13 | public DbSet Reservations { get; set; } 14 | public DbSet Trips { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Programing EF DbContext/StartingSolution/BreakAwayConsole/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter2/BAGA_DataAnnotations/Model/Lodging.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | public class Lodging 6 | { 7 | public int LodgingId { get; set; } 8 | [Required] 9 | [MaxLength(200)] 10 | [MinLength(10)] 11 | public string Name { get; set; } 12 | public string Owner { get; set; } 13 | public bool IsResort { get; set; } 14 | 15 | public Destination Destination { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_FluentAPI/Model/Trip.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Model 5 | { 6 | public class Trip 7 | { 8 | public Guid Identifier { get; set; } 9 | public DateTime StartDate { get; set; } 10 | public DateTime EndDate { get; set; } 11 | public decimal CostUSD { get; set; } 12 | public byte[] RowVersion { get; set; } 13 | 14 | public List Activities { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_DataAnnotations/Model/PersonPhoto.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [Table("People")] 6 | public class PersonPhoto 7 | { 8 | [Key] 9 | [ForeignKey("PhotoOf")] 10 | public int PersonId { get; set; } 11 | [Column(TypeName = "image")] 12 | public byte[] Photo { get; set; } 13 | public string Caption { get; set; } 14 | 15 | public Person PhotoOf { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter2/BreakAwayConsole/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter3/BreakAwayConsole/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter4/BreakAwayConsole/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter5/BreakAwayConsole/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter6/BreakAwayConsole/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter7/BreakAwayConsole/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/BreakAwayConsole/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 17 WCF EntityObjects/Chapter17ConsoleApp/Service References/CustomerService/CustomerService.disco: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 SelfTrackingEntities/2e Chapter 18 SelfTrackingEntities/Ch16 CustomerSTEService/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 WCF POCOs/BreakAwayModel POCO/App.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 WCF POCOs/Chapter18ConsoleTestModel/Service References/POCOCustomerService/CustomerService.disco: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/MvcApplication1/Views/Shared/LogOnUserControl.ascx: -------------------------------------------------------------------------------- 1 | <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> 2 | <% 3 | if (Request.IsAuthenticated) { 4 | %> 5 | Welcome <%= Html.Encode(Page.User.Identity.Name) %>! 6 | [ <%= Html.ActionLink("Log Off", "LogOff", "Account") %> ] 7 | <% 8 | } 9 | else { 10 | %> 11 | [ <%= Html.ActionLink("Log On", "LogOn", "Account") %> ] 12 | <% 13 | } 14 | %> 15 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_DataAnnotations/Model/PersonPhoto.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [Table("People")] 6 | public class PersonPhoto 7 | { 8 | [Key] 9 | [ForeignKey("PhotoOf")] 10 | public int PersonId { get; set; } 11 | [Column(TypeName = "image")] 12 | public byte[] Photo { get; set; } 13 | public string Caption { get; set; } 14 | 15 | public Person PhotoOf { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/Local.testsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | These are default test settings for a local test run. 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/MvcApplication1/Views/Home/About.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | About Us 5 | 6 | 7 | 8 |

About

9 |

10 | Put content here. 11 |

12 |
13 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/Chapter12Dynamic/DynamicData/FieldTemplates/Children_Insert.ascx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Specialized; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Web.DynamicData; 5 | using System.Web; 6 | using System.Web.UI; 7 | using System.Web.UI.WebControls; 8 | 9 | namespace Chapter12Dynamic 10 | { 11 | public partial class Children_InsertField : System.Web.DynamicData.FieldTemplateUserControl 12 | { 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 17 WCF EntityObjects/BreakAwayModel/Partial Classes Added in Chapter 10/Reservation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BAGA 7 | { 8 | partial class Reservation 9 | { 10 | [System.Runtime.Serialization.DataMember] 11 | public string TripDetails 12 | { 13 | get 14 | { 15 | return Trip.TripDetails; 16 | } 17 | set { } 18 | } 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 WCF POCOs/BreakAwayPOCOEntities/Partial Classes Added in Chapter 10/Reservation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BAGA 7 | { 8 | partial class Reservation 9 | { 10 | [System.Runtime.Serialization.DataMember] 11 | public string TripDetails 12 | { 13 | get 14 | { 15 | return Trip.TripDetails; 16 | } 17 | set { } 18 | } 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 20 Compiled Queries/BreakAwayModel/Partial Classes Added in Chapter 10/Reservation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BAGA 7 | { 8 | partial class Reservation 9 | { 10 | [System.Runtime.Serialization.DataMember] 11 | public string TripDetails 12 | { 13 | get 14 | { 15 | return Trip.TripDetails; 16 | } 17 | set { } 18 | } 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Local.testsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | These are default test settings for a local test run. 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 9 WPF/BreakAwayModel/App.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 9 WPF/Chapter 9 WPF/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter13SimplePOCO/Local.testsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | These are default test settings for a local test run. 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_FluentAPI/Model/InternetSpecial.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Model 4 | { 5 | public class InternetSpecial 6 | { 7 | public int InternetSpecialId { get; set; } 8 | public int Nights { get; set; } 9 | public decimal CostUSD { get; set; } 10 | public DateTime FromDate { get; set; } 11 | public DateTime ToDate { get; set; } 12 | 13 | public int AccommodationId { get; set; } 14 | public Lodging Accommodation { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/BAGA_FluentAPI/Model/InternetSpecial.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Model 4 | { 5 | public class InternetSpecial 6 | { 7 | public int InternetSpecialId { get; set; } 8 | public int Nights { get; set; } 9 | public decimal CostUSD { get; set; } 10 | public DateTime FromDate { get; set; } 11 | public DateTime ToDate { get; set; } 12 | 13 | public int AccommodationId { get; set; } 14 | public Lodging Accommodation { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 SelfTrackingEntities/2e Chapter 18 SelfTrackingEntities/Ch16STEConsoleApp/Service References/STECustomerService/Service1.disco: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 20 Perf Threading Etc/BreakAwayModel/Partial Classes Added in Chapter 10/Reservation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BAGA 7 | { 8 | partial class Reservation 9 | { 10 | [System.Runtime.Serialization.DataMember] 11 | public string TripDetails 12 | { 13 | get 14 | { 15 | return Trip.TripDetails; 16 | } 17 | set { } 18 | } 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 21 ObjectStateManager/BreakAwayModel/Partial Classes Added in Chapter 10/Reservation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BAGA 7 | { 8 | partial class Reservation 9 | { 10 | [System.Runtime.Serialization.DataMember] 11 | public string TripDetails 12 | { 13 | get 14 | { 15 | return Trip.TripDetails; 16 | } 17 | set { } 18 | } 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 11 Customization/BreakAwayModel/App.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 24 PI Tests Repository/Local.testsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | These are default test settings for a local test run. 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 9 Windows Forms/BreakAwayModel/App.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e PersistedStateEntry VB and C#/CloudService1/CloudService1/ServiceConfiguration.cscfg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter5 CSharp/BAGA_FluentAPI/Model/InternetSpecial.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Model 4 | { 5 | public class InternetSpecial 6 | { 7 | public int InternetSpecialId { get; set; } 8 | public int Nights { get; set; } 9 | public decimal CostUSD { get; set; } 10 | public DateTime FromDate { get; set; } 11 | public DateTime ToDate { get; set; } 12 | 13 | public int AccommodationId { get; set; } 14 | public Lodging Accommodation { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 17 WCF EntityObjects/BreakAwayModel/App.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 20 Compiled Queries/BreakAwayModel/App.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 24 PI Tests Repository/RepositoryUI/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 26 Layered WPF/BreakAwayModel POCO/App.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/BreakAwayModel POCO/App.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 9 Windows Forms/Chapter9WindowsForm/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/DataAccess/PersonPhotoConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | Imports System.ComponentModel.DataAnnotations 4 | 5 | Namespace DataAccess 6 | Public Class PersonPhotoConfiguration 7 | Inherits EntityTypeConfiguration(Of PersonPhoto) 8 | Public Sub New() 9 | HasKey(Function(p) p.PersonId) 10 | 11 | HasRequired(Function(p) p.PhotoOf).WithRequiredDependent(Function(p) p.Photo) 12 | End Sub 13 | End Class 14 | End Namespace -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 11 Customization/Chapter11Customization/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 20 Perf Threading Etc/Chapter20Threading/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 21 ObjectStateManager/ObjectStateVisualizerCS/VisualizerForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace EFExtensionMethods 11 | { 12 | public partial class VisualizerForm : Form 13 | { 14 | public VisualizerForm() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Data Annotations/Model/Lodging.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | Public Class Lodging 5 | Public Property LodgingId() As Integer 6 | 7 | Public Property Name() As String 8 | Public Property Owner() As String 9 | Public Property IsResort() As Boolean 10 | Public Property MilesFromNearestAirport() As Decimal 11 | 12 | Public Property Destination() As Destination 13 | End Class 14 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter3/BAGA_DataAnnotations/Model/Trip.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | 4 | namespace Model 5 | { 6 | public class Trip 7 | { 8 | [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] 9 | public Guid Identifier { get; set; } 10 | public DateTime StartDate { get; set; } 11 | public DateTime EndDate { get; set; } 12 | public decimal CostUSD { get; set; } 13 | [Timestamp] 14 | public byte[] RowVersion { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter4/BAGA_FluentAPI/DataAccess/PersonPhotoConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity.ModelConfiguration; 2 | using Model; 3 | using System.ComponentModel.DataAnnotations; 4 | 5 | namespace DataAccess 6 | { 7 | public class PersonPhotoConfiguration : EntityTypeConfiguration 8 | { 9 | public PersonPhotoConfiguration() 10 | { 11 | HasKey(p => p.PersonId); 12 | 13 | HasRequired(p => p.PhotoOf) 14 | .WithRequiredDependent(p => p.Photo); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 12 ASPNET Apps/BreakAwayModelCh7/App.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/DataAccess/InternetSpecialConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | Imports System.ComponentModel.DataAnnotations 4 | 5 | Namespace DataAccess 6 | Public Class InternetSpecialConfiguration 7 | Inherits EntityTypeConfiguration(Of InternetSpecial) 8 | Public Sub New() 9 | HasRequired(Function(s) s.Accommodation).WithMany(Function(l) l.InternetSpecials).HasForeignKey(Function(s) s.AccommodationId) 10 | End Sub 11 | End Class 12 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Fluent/DataAccess/InternetSpecialConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | Imports System.ComponentModel.DataAnnotations 4 | 5 | Namespace DataAccess 6 | Public Class InternetSpecialConfiguration 7 | Inherits EntityTypeConfiguration(Of InternetSpecial) 8 | Public Sub New() 9 | HasRequired(Function(s) s.Accommodation).WithMany(Function(l) l.InternetSpecials).HasForeignKey(Function(s) s.AccommodationId) 10 | End Sub 11 | End Class 12 | End Namespace -------------------------------------------------------------------------------- /Programing EF DbContext/AfterCompletingChapter8/DataAccess/BaseContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Data.Entity; 6 | 7 | namespace DataAccess 8 | { 9 | public class BaseContext : DbContext 10 | where TContext : DbContext 11 | { 12 | static BaseContext() 13 | { 14 | Database.SetInitializer(null); 15 | } 16 | 17 | protected BaseContext() 18 | : base("name=breakaway") 19 | { 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter3/Chapter 3 VB/Fluent/DataAccess/DestinationConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | 4 | Namespace DataAccess 5 | Public Class DestinationConfiguration 6 | Inherits EntityTypeConfiguration(Of Destination) 7 | Public Sub New() 8 | Me.Property(Function(d) d.Name).IsRequired() 9 | 10 | Me.Property(Function(d) d.Description).HasMaxLength(500) 11 | 12 | Me.Property(Function(d) d.Photo).HasColumnType("image") 13 | End Sub 14 | End Class 15 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Fluent/DataAccess/DestinationConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | 4 | Namespace DataAccess 5 | Public Class DestinationConfiguration 6 | Inherits EntityTypeConfiguration(Of Destination) 7 | Public Sub New() 8 | Me.Property(Function(d) d.Name).IsRequired() 9 | 10 | Me.Property(Function(d) d.Description).HasMaxLength(500) 11 | 12 | Me.Property(Function(d) d.Photo).HasColumnType("image") 13 | End Sub 14 | End Class 15 | End Namespace -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 18 SelfTrackingEntities/2e Chapter 18 SelfTrackingEntities/ReadMe.txt: -------------------------------------------------------------------------------- 1 | Programming Entity Framework 2nd Edition 2 | by Julia Lerman 3 | www.ProgrammingEntityFramework.com 4 | Chapter 18, Sample application with self tracking entities 5 | 6 | The current connection string in the WCF Service project's web.config points to a local sql server 2008 database. If you are using SQL Server Express, you should change the data source from . to .\SQLExpress. 7 | 8 | Julie Lerman 9 | thedatafarm.com/blog 10 | twitter.com/julielerman -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/Ch27WebForm/About.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Title="About Us" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" 2 | CodeBehind="About.aspx.cs" Inherits="Ch25WebForm.About" %> 3 | 4 | 5 | 6 | 7 |

8 | About 9 |

10 |

11 | Put content here. 12 |

13 |
14 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter 2 VB/Fluent API/DataAccess/DestinationConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | 4 | Namespace DataAccess 5 | Public Class DestinationConfiguration 6 | Inherits EntityTypeConfiguration(Of Destination) 7 | Public Sub New() 8 | Me.Property(Function(d) d.Name).IsRequired() 9 | 10 | Me.Property(Function(d) d.Description).HasMaxLength(500) 11 | 12 | Me.Property(Function(d) d.Photo).HasColumnType("image") 13 | End Sub 14 | End Class 15 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter4/Chapter 4 VB/Data Annotations/Model/Trip.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | Public Class Trip 5 | 6 | Public Property Identifier() As Guid 7 | Public Property StartDate() As Date 8 | Public Property EndDate() As Date 9 | Public Property CostUSD() As Decimal 10 | 11 | Public Property RowVersion() As Byte() 12 | 13 | Public Property Activities() As List(Of Activity) 14 | End Class 15 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter5/Chapter 5 VB/Data Annotations/Model/Trip.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | Public Class Trip 5 | 6 | Public Property Identifier() As Guid 7 | Public Property StartDate() As Date 8 | Public Property EndDate() As Date 9 | Public Property CostUSD() As Decimal 10 | 11 | Public Property RowVersion() As Byte() 12 | 13 | Public Property Activities() As List(Of Activity) 14 | End Class 15 | End Namespace -------------------------------------------------------------------------------- /Programming EF Code First/chapter6/Chapter6/Chapter 6 VB/Fluent/DataAccess/InternetSpecialConfiguration.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.Entity.ModelConfiguration 2 | Imports Model 3 | Imports System.ComponentModel.DataAnnotations 4 | 5 | Namespace DataAccess 6 | Public Class InternetSpecialConfiguration 7 | Inherits EntityTypeConfiguration(Of InternetSpecial) 8 | Public Sub New() 9 | HasRequired(Function(s) s.Accommodation).WithMany(Function(l) l.InternetSpecials).HasForeignKey(Function(s) s.AccommodationId) 10 | End Sub 11 | End Class 12 | End Namespace -------------------------------------------------------------------------------- /Programing EF DbContext/StartingSolution/Model/Address.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Model 4 | { 5 | [ComplexType] 6 | public class Address 7 | { 8 | public int AddressId { get; set; } 9 | [MaxLength(150)] 10 | [Column("StreetAddress")] 11 | public string StreetAddress { get; set; } 12 | [Column("City")] 13 | public string City { get; set; } 14 | [Column("State")] 15 | public string State { get; set; } 16 | [Column("ZipCode")] 17 | public string ZipCode { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /Programming EF 2nd Edition/2e Chapter 27 ASP.NET Apps/MvcApplication1/Views/Shared/Error.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2 | 3 | 4 | Error 5 | 6 | 7 | 8 |

9 | Sorry, an error occurred while processing your request. 10 |

11 |
12 | -------------------------------------------------------------------------------- /Programming EF Code First/chapter2/Chapter 2 VB/Data Annotations/Model/Destination.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel.DataAnnotations 2 | 3 | Namespace Model 4 | Public Class Destination 5 | Public Property DestinationId() As Integer 6 | 7 | Public Property Name() As String 8 | Public Property Country() As String 9 | 10 | Public Property Description() As String 11 | 12 | Public Property Photo() As Byte() 13 | 14 | Public Property Lodgings() As List(Of Lodging) 15 | End Class 16 | End Namespace --------------------------------------------------------------------------------