Be Connected with Israel's Blogging Community
בית
משתמש קיים
פתח בלוג
עזרה
Search
RSS
prev
next
Search
More Search Options
Entity-Framework Code First Designer with Database Initialization in few simple steps!
I find it very frustrating that I cannot use the entity model designer to generate code-first DbContext & entities that retains all the aspects of code-first including database initialization. Here are a set of instructions that can easily ...
המשך לקרוא>
Shimmy
, 05-11-2012 6:49
Get a list of all countries in C#
I'm sharing it here mostly for myself, but I hope someone else would also be able to enjoy it once... static IEnumerable < Country > GetCountries () { return from ri in from ci in CultureInfo . GetCultures ( CultureTypes . SpecificCultures ...
המשך לקרוא>
Shimmy
, 05-11-2012 6:15
No ICloneable in WinRT?
Looks like the ICloneable interface has not been included in WinRT. I could guess it's because of the uncertainty of whether the implentation is a shallow or a deep clone. Would like to hear what you think about it.
Shimmy
, 03-30-2012 1:57
Get Jewish date string
namespace System . Globalization { public static class DateTimeExtensions { private const string HebrewCultureName = "he-IL" ; private static readonly CultureInfo HebrewCulture = #if SILVERLIGHT new CultureInfo ( HebrewCultureName ...
המשך לקרוא>
Shimmy
, 03-04-2012 15:24
Determine if char is Hebrew (2)
About 2 weeks ago I posted a function that determines whether a given char is hebrew: // avoid unicode chars in code private const char FirstHebChar = ( char )1488; //א private const char LastHebChar = ( char )1514; //ת private static bool IsHebrew ...
המשך לקרוא>
Shimmy
, 02-03-2012 2:52
LeakEvent → WeakEvent
I'm sure not any Silverlight developer is aware of the fact that when one subscribes to an event, a strong reference to the handler class ('target') is attached to the event source ('source'), hence, if the source object ...
המשך לקרוא>
Shimmy
, 02-01-2012 15:53
Congratulations! We had a new babygirl!
Hi everyone! We just a had a very cute babygirl! Hope to post some photo any time soon...
Shimmy
, 01-23-2012 4:03
UniqueAttribute that validates a unique field against its fellow rows in the database (inherits DataAnnotations...
UPDATE: Jan 30 2012 : Added check that entity is not itself (i.e. when user attempts to save the same entity). UPDATE: Feb 26 2012 : Added support for inherited entities, where the validated property is on the sub-class of the inheritance hierarchy ...
המשך לקרוא>
Shimmy
, 01-23-2012 4:00
Determine if char is Hebrew
Simple Ex. method: // avoid unicode chars in code private const char FirstHebChar = ( char )1488; //א private const char LastHebChar = ( char )1514; //ת private static bool IsHebrew ( this char c ) { return c >= FirstHebChar && c ...
המשך לקרוא>
Shimmy
, 01-19-2012 0:38
Enum.IsDefined for combined values not declared in the enum body
When you try to determine if an Enum value is defined in an Enum, it returns true only if the flags you've combined are explicitly declared in the Enum. Consider this Enum: [ Flags ] // Enum defined with a FlagsAttribute attribute. enum ...
המשך לקרוא>
Shimmy
, 01-12-2012 3:32