DateTime in ASP.Net Core at Azure
I did the ASP.Net Core MVC web app in Azure. I found all DateTime values are displayed in US format. Even I set in Startup.cs set DefaultRequestCulture to be en-au. It does not work. Finally, I used to use DisplayFormat attribute in The object.
Code
[DisplayFormat(DataFormatString = @"{0:dd\/MM\/yyyy}", ApplyFormatInEditMode = true)] | |
public DateTime? DateTime { get; set; } |
That works in display form. Moreover, the input field will display value in this format.
iPhone 8 is launched in Australia too
Today, iPhone 8 and iPhone 8 Plus is launched in Australia. You can get a real stock in Apple Stores today. This morning, I went to City. I saw there are a few news reports in front of the Apple Stores in City and inside the store, there are a lot of people too. I think that was the people wish to get iPhone 8.
This afternoon, I got some free time, so I spent some time inside the store. I had a quick play with iPhone 8. It looks cool; I like the dual camera! I saw a few people got their iPhone 8 inside. They look quite happy.
Will you get one?
Nest Objects in View Model in ASP.Net MVC Core
I started to use ASP.Net Core in our web development. The first challenge I faced is about the nested View Model.
I have not used much in nested view model in the previous of MVC,
I got the View Models like this:
Code
public Order{ | |
public int Id {get;set;} | |
public Customer Customer {get;set;} | |
} | |
| |
public Customer{ | |
public string FirstName {get;set;} | |
public string LastName {get;set;} | |
} |
If I wish to do the binding in the razor html
You have to add the bind in the controller
Code
public async Task add the binding in the Customer class too | |
|
mc_code_odd">[Bind("FirstName,LastName")]
public Customer{
public string FirstName {get;set;}
public string LastName {get;set;}
}
My New Phone - Galaxy S8 Plus
After around one year and eight months, LG V10 is finally gone. It has a bootloop. I researched on the internet, that should be a motherboard issue. I am a mobile application developer. I cannot live without a phone in a single day. Finally, I bought a Galaxy S8 Plus.
I believe Galaxy S8 Plus got the highest specifications in the market.
It got Exynos 9 Octa-Core Chip CPU and 4GB. It got a high processing power. Moreover, the screen is Super AMOLED Infinity Display and 2960 x 1440. That got a stunning display. Also, it can record 4K video. I love it.
The one things. I did not like; it has not a hardware home and back button. I need to use the software toolbar at the bottom for this purpose. That is much too harder.
There is one significant change. It used USB Type-c. Therefore, all of the micro-USB cables cannot be used anymore. Luckily, in the box, there is a USB-C to micro-USB adapter. I love it.
In general, I love this phone.
Google Home
A few week ago, I went to JB HiFi. I found Google Home arrives. That cost $199. Google Home is mainly a physical version of Google Assistant. You can talk to it then you locate the answer from Google and schedule a meeting. Also, that is a hub for your smart home appliances. of course, it can be a Bluetooth speaker. Lastly, it looks stylish too. But for myself, I have not any smart home appliances yet. That is not very useful for me yet.