var tzCollection = TimeZoneInfo.GetSystemTimeZones();
var timeZoneTypes = new List<TimeZoneType>();
foreach (var timeZoneInfo in tzCollection)
{
var timeZoneType = new TimeZoneType
{
TimeZoneInfoId = timeZoneInfo.Id,
DaylightName = timeZoneInfo.DaylightName,
DisplayName = timeZoneInfo.DisplayName,
StandardName = timeZoneInfo.StandardName,
SupportsDaylightSavingTime = timeZoneInfo.SupportsDaylightSavingTime,
Ticks = timeZoneInfo.BaseUtcOffset.Ticks
};
timeZoneTypes.Add(timeZoneType);
}
foreach (var timeZoneType in timeZoneTypes)
{
db.TimeZoneTypes.Add(timeZoneType);
db.Commit();
}
Reflection etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
Reflection etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
30 Temmuz 2018 Pazartesi
15 Ağustos 2016 Pazartesi
Çalışma zamanı metot üretip çalıştırma
Type type = Type.GetType("Namespace.ClassName");
MethodInfo method = type.GetMethod("MethodName");
object targetClass = Activator.CreateInstance(type);
object[] paramters= new object[] { paramter1,..., parameterN };
method.Invoke(targetClass, paramters);
MethodInfo method = type.GetMethod("MethodName");
object targetClass = Activator.CreateInstance(type);
object[] paramters= new object[] { paramter1,..., parameterN };
method.Invoke(targetClass, paramters);
29 Nisan 2015 Çarşamba
Model property doğrulama
// Arrange
var propertyInfo = typeof(TEntity).GetProperty("PropertyName");
// Act
var attribute = propertyInfo.GetCustomAttributes(typeof(RequiredAttribute))
.Cast<RequiredAttribute>()
.FirstOrDefault();
attribute null değilse PropertyName özelliği [Required]'dır
var propertyInfo = typeof(TEntity).GetProperty("PropertyName");
// Act
var attribute = propertyInfo.GetCustomAttributes(typeof(RequiredAttribute))
.Cast<RequiredAttribute>()
.FirstOrDefault();
attribute null değilse PropertyName özelliği [Required]'dır
Kaydol:
Kayıtlar (Atom)
.net 6 mapget kullanımı
app.UseEndpoints(endpoints => { endpoints.MapGet("/", async context => { var response = JsonConvert.Seriali...
-
Komut ekranına aşagıdaki komutları yazarak windows service işlemlerini gerçekleştirebiliriz. Not : Komut ekranı (Başlat -> Çalıştır -...
-
COMMAND PROMPT TEMEL VE İLERİ DÜZEY ANLATIM Command Prompt komutlarını anlatmaya başlamadan önce, MS-DOS komut türlerine değinelim. Komut...
-
(3)BİN (6)MİLYON (9)MİLYAR (12)TRİLYON (15)KATRİLYON (18)KENTİLYON (21)SEKSİLYON (24)SEPTİLYON (27)OKTİLYON (30)NONİLYON (33)DESİL...