Base solution for your next web application

Activities of "skinnerjames"

Thanks. Do you happen to know how I can access the metronic resources with my aspnetzero purchase?

Does anyone have a recommendation for an appointment scheduler plugin that works well with the SPA version of ASPNet Zero? If your application has a scheduler, are you building this from scratch?

Thank you! The issue was the missing line in InitialDBBuilder.cs file "new InitialPatientCreator(_context).Create();".

Question

I am trying to add a "patient" registration form by following the steps in the Acme.PhoneBook tutorial and am getting stuck on several points. The first point is using the Seed Method to import sample data into the DB. Here is my InitialPatientCreator.cs code.

using System.Collections.Generic; using System.Linq; using AHPClaims.AHPClaims.EntityFramework; using AHPClaims.AHPClaims.Patients;

namespace AHPClaims.AHPClaims.Migrations.Seed { public class InitialPatientCreator { private readonly AHPClaimsDbContext _context;

    public InitialPatientCreator(AHPClaimsDbContext context)
    {
        _context = context;
    }

    public void Create()
    {
        var douglas = _context.Patients.FirstOrDefault(p => p.EmailAddress == "[email protected]");
        if (douglas == null)
        {
            _context.Patients.Add(
                new Patient
                {
                    Name = "Douglas",
                    Surname = "Adams",
                    EmailAddress = "[email protected]"
                });
        }

        var asimov = _context.Patients.FirstOrDefault(p => p.EmailAddress == "[email protected]");
        if (asimov == null)
        {
            _context.Patients.Add(
                new Patient
                {
                    Name = "Isaac",
                    Surname = "Asimov",
                    EmailAddress = "[email protected]"
                });
        }
        _context.SaveChanges();
    }
}

}

Up to this point everything has worked as it should. When I run Update-Database in package manager nothing imports into DB. Does something in this file appear incorrect? Thanks in advance.

Yes, I am following the step by step instructions. However, the section about adding person entity does not clearly explain which file to create person entity in. From the code sample on github, I am understanding that I need to create a new folder in the .core section of the application for the person class. Thanks for your response.

I am stuck on this point also. Can anyone advise which file to add person entity creation to?

Any chance I can gain access also? skinnerjames

I am looking for someone who can help with some programming with the ASP net zero framework. Basic forms reading and writing to tables, etc. If you have any interest please email me at <a href="mailto:[email protected]">[email protected]</a> thanks.

I am not sure if this is appropriate for this forum or not. If not, my apologies. I am looking for someone who knows this starter template wll and would be interested in some freelance programming. Basic web forms, CRUD table connctions, etc. All within the ASPNetZero framework. Please reply with contact info, or PM me at <a href="mailto:[email protected]">[email protected]</a>

I was able to figure it out. Thanks

Showing 11 to 20 of 21 entries