16,004,587 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Attiq-ul Islam (Top 16 by date)
Attiq-ul Islam
11-Nov-15 18:40pm
View
Welcome, but let me check it at first. I was busy, so i should try now.
No problem. I will let you know the final result.
Attiq-ul Islam
5-Nov-15 6:23am
View
I think it's related to cross domain issue. Here you will get details -https://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html. I will go though the instructions very soon.
Attiq-ul Islam
5-Nov-15 6:20am
View
No, all are public videos.
Attiq-ul Islam
24-Mar-15 1:33am
View
Hmm. Thanks a lot once again.
Attiq-ul Islam
23-Mar-15 16:26pm
View
Thanks a lot.
Attiq-ul Islam
23-Mar-15 16:26pm
View
Deleted
Thanks a lot.
Attiq-ul Islam
23-Mar-15 15:36pm
View
first of all thanks a lot for your cooperation. I explained my situation again. Please see the question.
Attiq-ul Islam
23-Mar-15 15:33pm
View
But, what is the better option? could you please give me an example?
Attiq-ul Islam
23-Mar-15 15:31pm
View
Could you please give me an example?
Attiq-ul Islam
23-Mar-15 14:49pm
View
yes, you are right. However, should i use reflection to solve the problem or there is a better way to introduce EF in my project?
Attiq-ul Islam
23-Mar-15 14:46pm
View
the solution should use generic list. However, thanks a lot for your kind cooperation.
Attiq-ul Islam
23-Mar-15 14:46pm
View
Deleted
thanks a lot for your kind cooperation.
Attiq-ul Islam
23-Mar-15 14:43pm
View
Yes, you are right. Moreover,those are very good tutorials.
However, should i use reflection?
Thanks a lot for your kind cooperation.
Attiq-ul Islam
23-Mar-15 13:43pm
View
Yes, I know inheritance, i also know this is not any way of OOP concept. However, the main problem is my project already developed based on SQL server, and factory pattern is being used in my project. That's why, i just want to change only DataAccessManager class. Moreover, we named all model classes after all data table name (i.e for data table named Agent, the class name is AgentModel; for the data table product, the class name is ProductModel). However, my management wanted to use Entity Framework. As a result, i have followed DB first approach as i already have data tables. However, problem is that EF generate classes with the same name of data tables. Thus, the conversion is required. So, is there any way to name EF classes as like existing classes? or what should be the best solution?
Attiq-ul Islam
15-Feb-15 0:12am
View
Deleted
Deal all,
Thanks all of you for your kind initiatives. However, I solved the problem like following way -
01. I extracted all days of a date range, using following store procedure.
Create PROCEDURE getAllDaysBetweenTwoDate
(
@FromDate DATETIME,
@ToDate DATETIME
)
AS
BEGIN
DECLARE @TOTALCount INT
SET @FromDate = DATEADD(DAY,-1,@FromDate)
Select @TOTALCount= DATEDIFF(DD,@FromDate,@ToDate);
WITH d AS
(
SELECT top (@TOTALCount) AllDays = DATEADD(DAY, ROW_NUMBER()
OVER (ORDER BY object_id), REPLACE(@FromDate,'-',''))
FROM sys.all_objects
)
SELECT AllDays From d
RETURN
END
GO
*********************************************************
02. Then I used every day to find the distinct fiscal years like following way -
create proc SpGetFiscalYearsByDateRange
(
@StartDate varchar(50),
@EndDate varchar(50),
@CompanyId varchar(20)
)
As
declare @SpName nvarchar(300)
declare @Day date
declare @RowFound int
declare @Count int
BEGIN
set @SpName = 'getAllDaysBetweenTwoDate @FromDate='''+@StartDate+''', @ToDate = '''+@EndDate+'''';
create table #AllDays
(
ID int IDENTITY(1,1) PRIMARY KEY,
oDay datetime
)
insert into #AllDays (oDay)
EXEC sp_executesql @SpName
set @RowFound = @@ROWCOUNT
-- create temp table for storing Fiscal year(s)
create table #FiscalYear
( SYear date,
EYear date
)
declare @sDate varchar(50)
declare @eDate varchar(50)
/*
-- declare cursor
declare @FyCursor cursor
Set @FyCursor = cursor fast_forward
for select oDay from #AllDays
open @FyCursor
fetch NEXT from @FyCursor
into @Day
WHILE @@FETCH_STATUS = 0
BEGIN
select @sDate = StartDate , @eDate = EndDate from tblFiscalYear where CompanyID = @CompanyId and @Day between StartDate and EndDate
IF NOT EXISTS (select 1 from #FiscalYear where SYear = @sDate and EYear = @eDate)
BEGIN
insert into #FiscalYear(SYear,EYear) select StartDate,EndDate from tblFiscalYear where CompanyID = @CompanyId and @Day between StartDate and EndDate
END
fetch NEXT from @FyCursor
END
*/
-- to improve performance I replaced the cursor with while loop
set @Count = 1
while @Count <= @RowFound
BEGIN
select @Day = oDay from #AllDays where ID = @Count
select @sDate = StartDate , @eDate = EndDate from tblFiscalYear where CompanyID = @CompanyId and @Day between StartDate and EndDate
IF NOT EXISTS (select 1 from #FiscalYear where SYear = @sDate and EYear = @eDate)
BEGIN
insert into #FiscalYear(SYear,EYear) select StartDate,EndDate from tblFiscalYear where CompanyID = @CompanyId and @Day between StartDate and EndDate
END
set @Count = @Count +1
END
select distinct SYear, EYear from #FiscalYear
drop table #AllDays
drop table #FiscalYear
END
Attiq-ul Islam
22-Jan-14 8:31am
View
Thanks for the solution.
Show More