Saturday, March 2, 2019
no image

Introducing AdonisUI - A Lightweight UI toolkit for WPF applications

https://github.com/benruehl/adonis-ui

​

Hey there,

for the past few months I've been working on a UI toolkit for WPF apps called AdonisUI.

It aims at creating a look and feel that is similar to the default one but more consistent and up-to-date.

It ships with a light and dark theme and supports switching between them at runtime.

Additional features for common use cases like watermarks, loading throbbers, grid column sorting, etc. are included as well.

By now almost all WPF controls are supported and I am working on closing the last few gaps, adding minor features and fixing issues.

I would be pleased to receive your feedback.

Introducing AdonisUI - A Lightweight UI toolkit for WPF applications Click here
Read More
Friday, March 1, 2019
no image

Working with LittleAspNetCoreBook, need to restore identity migrations

I'm coming mostly form a webforms background, working through the Little AspNet Core book (great book btw http://littleasp.net/book ). All was going well till I kind of messed up my migrations, and deleted the whole folder, and then did dotnet ef migrations add AddItems to create the AddItems migration. But there is supposed to also be a CreateIdentitySchema and CreateIdentitySchema.Designer migration that were created when you run dotnet new, only the project is no longer new. How do recreate these?

The author has a github but the files up there have a lot of other stuff that comes up in later steps that I want to do along with the tutorial when I get to it.

Working with LittleAspNetCoreBook, need to restore identity migrations Click here
Read More
no image

Entityframework eager loading.

Are there any other way to load the related objects of my class, specially the Address? I am new to EF and did some research and cant find a similar case, I red about Lazy Loading but suggest to avoid it if your building a Web Application.

Here's the code to retrieve a single company

_context.Companies

.Include(c=>c.Address.Province)

.Include(c=>c.Address.CityMunicipality)

.Include(c=>c.Address.Town)

.Include(c=>c.ContactInformation)

.Where(c => c.CompanyId == Id).FirstOrDefault();

​

I have a class of Company that has relation To Address Class, Address class has a navigation Property of Province, CityMunicipality and Town.

​

public class Company

{

public int CompanyId { get; set; }

public string CompanyCode { get; set; }

public string CompanyName { get; set; }

public virtual ContactInformation ContactInformation{ get; set; }

public virtual Address Address{ get; set; }

}

​

public class Address

{

public int Id { get; set; }

[ForeignKey("Company")]

public int? CompanyId { get; set; }

public virtual Company Company { get; set; }

[ForeignKey("Province")]

public int ProvinceId { get; set; }

public virtual Province Province { get; set; }

[ForeignKey("CityMunicipality")]

public int CityMunicipalityId { get; set; }

public virtual CityMunicipality CityMunicipality { get; set; }

[ForeignKey("Town")]

public int TownId { get; set; }

public virtual Town Town { get; set; }

public string Street { get; set; }

}

​

Entityframework eager loading. Click here
Read More
no image

I'm completely new to ASP.NET so please excuse my ignorance, am I able to show/hide certain HTML elements (like an image) from code behind after the page has loaded? For example, can I display an image after the user clicks a button and then hide that image after the click event completes?

The click event calls another function that generates a file, this can take about 15 seconds and I'd like to show/hide a loading image.

I just didnt know if this is something that is as simple as using elementId.Visible = true/false before the function call within the event and then again after the function finishes.

Do I need to use AJAX for this?

I'm completely new to ASP.NET so please excuse my ignorance, am I able to show/hide certain HTML elements (like an image) from code behind after the page has loaded? For example, can I display an image after the user clicks a button and then hide that image after the click event completes? Click here
Read More
The webdev Team